Hello all,

Unfortunately my organization has made the decision to stick with OSG 1.2.  At 
this point it is not an option to upgrade, so the question pertains to how to 
solve a particular problem in 1.2.  I am a newbie to OSG and 3D in general, so 
please be patient with me!

I have a window that displays a scene.  The scene is comprised of a series of 
Nodes, one of which I'll call a Ship Node.  All of the Nodes (including the 
Ship Node) are added to a single Root Node, which is then added to the 
SceneView.  

I believe I have successfully created a BoundingBox around this Ship Node.  
What I'm trying to do is detect when the camera eye point intersects with this 
BoundingBox.

The camera can move in and out (using setViewMatrixAsLookAt and changing the 
eye parameter).  I also have the ability to rotate up, down, left, and right.  
This is done by applying the rotations to the Root Node.  

I have tried to obtain the world coordinates of the Ship Node at any given time 
via getBound() * getWorldMatrix()[0].  The camera eye point seems far more 
difficult.  No matter what I do, I can't get the camera to intersect with the 
BoundingBox properly.  Is the eye considered part of the 'world'?  And if so, 
does it need to be translated to world coordinates to make this work?

I suspect I am going about this problem completely wrong.  I can post snippets 
of code if necessary.  Any ideas?  

Thank you for your time,

Todd

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53046#53046





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to