Hi,

I'm trying to use a PolytopeIntersector in my scene and so far I have succeeded 
but only by using the camera (i.e. mCamera->accept(PolyVisitor)) with a 
PolytopeIntersector built from x and y coordinates in window frame. However I 
would rather pass the visitor the root of my scene. I am doing this in a 
virtual reality project, and using the camera seems to complicate things a fair 
bit because we modify projection matrices and viewports a whole lot. 

For my LineSegmentIntersector I have used 3D points in model space, which 
worked fine when visiting the root of the scene. For the PolytopeIntersector I 
am unsure how to do this... Only examples I have found so far used either 
coordinates in projection space or coordinates in window space.

Now I have seen the CoordinateFrame MODEL or VIEW in the PolytopeIntersector 
constructor, but I am unsure as how to use it. I have seen that the Znear plane 
is fixed to 0 for MODEL and VIEW coordinate frames.. Does this mean that any 
object behind Z=0 could not be intersected?

I also have a bad feeling that building and using the PolytopeIntersector in 
MODEL and VIEW coordinate frames will make it just rectangular instead of 
pyramidal. 

To recapitulate : I am trying to build a polytpe intersector from one 3d point 
in model space (or world space) and it's orientation. I would prefer this 
polytope intersector to be independent from the cameras or viewports. I am 
stuck at this point. Am I assuming something wrong? Did I miss something that 
could make this simpler? Do you have any clue that could help me? Am I even 
making sense? :D 

Thank a lot,

Sincerely,
Julien-Charles

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





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

Reply via email to