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

2008-07-03 Thread Per Rosengren
trix()) _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 &g

[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] Multisampling: How to enable

2008-04-15 Thread Per Rosengren
create the GraphicsContext::Traits, when 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]

Re: [osg-users] Installing OSG in Ubuntu

2008-04-15 Thread Per Rosengren
I think I just did apt-get build-dep openscenegraph which will install everything you need in order to build osg itself. I did this successfully on Ubuntu 8.04, but it should work for the stable release too. Robert Osfield wrote: > Hi Harold, > > You'll need to install OpenGL headers as well a

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

2008-04-15 Thread Per Rosengren
osg::DisplaySettings::instance()->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

[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 modelView->getCamera()->ge

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

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_ptr node = osgDB::readNodeFile("cow.osg");*

Re: [osg-users] PickHandler::pick example picking the display Text HUD also

2008-03-10 Thread Per Rosengren
I check if the intersection belongs to the correct node: osgUtil::LineSegmentIntersector::Intersections intersections; osgUtil::LineSegmentIntersector::Intersections::iterator intersection; marked.isActive = false; bool result = viewer->computeIntersections

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 c

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] 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 ¢er, const osg::Vec3 &up) and provide it with the pos

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 (osg::Pa

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()->setProj

[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 email;internet:

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 use

[osg-users] Printing the scene graph as text

2008-02-17 Thread Per Rosengren
I order to debug the osg program I am currently working on, I have written some functions to print the scene graph as text. For instance, notify(NOTICE) << myNode; will print the following to stdout: Camera: Group: Scene root Group: ../..

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

2008-02-16 Thread Per Rosengren
ressing space bar 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 visib

[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 or