Re: [osg-users] Converting model to screen coordinates

2008-07-03 Thread Per Rosengren
()) _modelToWindowMatrix.preMult( *iv.getModelMatrix() ); } Later I use this to get the window coordinates: pWindow0 = p0 * _modelToWindowMatrix; Per Rosengren Helbig, Yuen wrote: Hello, I'm trying to convert from model coordinates to screen coordinates with the following code: // Compute

[osg-users] Check support for multi sampling

2008-05-16 Thread Per Rosengren
I set multi sampling with the following code: ref_ptr DisplaySettings displaySettings = new DisplaySettings; displaySettings-setNumMultiSamples(16); displaySettings-setMinimumNumAlphaBits(8); modelView-setDisplaySettings( displaySettings.get() ); If the graphics card does not support multi

Re: [osg-users] Node to Drawable?

2008-04-15 Thread Per Rosengren
If it's not a Geode, it's probably a Group. Look for the Geode among your Node's children. This approach may be easier if you always load the same model. Jacob Huckaby wrote: Hi, Quick question (at least I hope it is.) I am trying to find the Drawable inside a Node that I read from a file,

[osg-users] Multisampling: How to enable

2008-04-15 Thread Per Rosengren
I have tried to enable multi sampling, but it has no effect. This is how I try to activate it: modelView = new osgViewer::View; modelView-setUpViewInWindow (400, //x 0, //y 640, //width 480); //height

Re: [osg-users] Multisampling: How to enable

2008-04-15 Thread Per Rosengren
()-setNumMultiSamples(8); viewer.setSceneData(buildMyScene()); return viewer.run(); } Per Rosengren a écrit : I have tried to enable multi sampling, but it has no effect. This is how I try to activate it: modelView = new osgViewer::View; modelView-setUpViewInWindow

Re: [osg-users] Multisampling: How to enable

2008-04-15 Thread Per Rosengren
creating graphics windows yourself, you can manually set the number of samples, same applies if you use MFC/QT etc. to create your own graphics windows. Robert. On Tue, Apr 15, 2008 at 2:02 PM, Per Rosengren [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Thank you (both)! It works

Re: [osg-users] load image file and store as a node

2008-04-09 Thread Per Rosengren
You need to set the loaded image as the texture on a polygon node. Bryan Berg wrote: Hi, So I was looking at: http://www.openscenegraph.org/index.php?page=UserGuides.Plugins Specifically: *a)osg::ref_ptrNode node = osgDB::readNodeFile(cow.osg);* and *b)

Re: [osg-users] Stereoscopy, part 2

2008-02-22 Thread Per Rosengren
You probably tried osgViewer::View::setUpViewAcrossAllScreens () if you have one desktop on two screens, or osgViewer::View::setUpViewOnSingleScreen (unsigned int screenNum=0) , one for each viewer, if you have two desktops. If so, what happened? Renan Mendes wrote: Hi, It's been a

Re: [osg-users] HUD with perspective

2008-02-19 Thread Per Rosengren
You have to set both the view matrix and the projection matrix of the camera. The view matrix is the pose of the scene coordinate system in the camera coordinate system. Use voidsetViewMatrixAsLookAt (const osg::Vec3 eye, const osg::Vec3 center, const osg::Vec3 up) and provide it with the

Re: [osg-users] converting .svg to .osg? ... or project from svg to svg

2008-02-19 Thread Per Rosengren
I have used 3dldf (http://www.gnu.org/software/3dldf/) earlier to create vector graphics from 3d models. It would be extremely cool to extend osg to create vector graphics output with an SVG Viewer! Imagine infinite resolution rendering! This would be really difficult, since you can't use depth

Re: [osg-users] LineSegment and Plane Intersection

2008-02-18 Thread Per Rosengren
The osgUtil::IntersectionVisitor has the foolowing applys: virtual voidapply (osg::Node node) virtual voidapply (osg::Geode geode) virtual voidapply (osg::Billboard geode) virtual voidapply (osg::Group group) virtual voidapply (osg::LOD lod) virtual voidapply

Re: [osg-users] Loading an image file

2008-02-17 Thread Per Rosengren
I too need to show images. Since osg is (and should be) 3d-based, the way to do is seemed to be to display a rectange Geometry infront of an orthographic camera, and set the rectangle texture to be the image. Instead of this, I chose to use OpenCV (CV for Computer Vision), but you can also

[osg-users] Setting the camera matrix for a viewer

2008-02-17 Thread Per Rosengren
Hod do I set the camera matrix for a viewer. If use viewer.getCamera()-setViewMatrix(viewMatrix); viewer.getCamera()-setProjectionMatrix(projectionMatrix); the camera isn't affected. begin:vcard fn:Per Rosengren n:Rosengren;Per org:KTH;CVAP adr:;;KTH;Stockholm;;SE-100 44;Sweden

Re: [osg-users] Setting the camera matrix for a viewer

2008-02-17 Thread Per Rosengren
attaches a Camera manipulator by default. Paul Martz Skew Matrix Software On Feb 17, 2008, at 5:31 PM, Per Rosengren [EMAIL PROTECTED] wrote: Hod do I set the camera matrix for a viewer. If use viewer.getCamera()-setViewMatrix(viewMatrix); viewer.getCamera()-setProjectionMatrix(projectionMatrix

Re: [osg-users] Adding nodes to the scene while the viewer is running

2008-02-16 Thread Per Rosengren
to force the camera manipulator back to its home position. Robert. 2008/2/15 Per Rosengren [EMAIL PROTECTED]: I try to add Geoms to the scene of my running osgViewer::Viewer. If I print all children of Viewer::getCamera(), the new nodes are there, but they are not visible in the viewer. They are added

[osg-users] Adding nodes to the scene while the viewer is running

2008-02-15 Thread Per Rosengren
I try to add Geoms to the scene of my running osgViewer::Viewer. If I print all children of Viewer::getCamera(), the new nodes are there, but they are not visible in the viewer. They are added to a Switch in the scene, and they are set to be visible. begin:vcard fn:Per Rosengren n:Rosengren;Per