[osg-users] questions about boundingBox and contains()

Christian Sam osgforum at tevs.eu
Tue Mar 10 07:25:41 PDT 2009


hi,

as far as i understand every Drawable object in the scenegraph does have a "_boundingBox" data member.

* does the user have to manually initalize this boundingBox (with a call like "myDrawableOject.computeBound()"), or has it already been set by osg to nodes' geometry extent (xmin, xmax, ymin, ymax, zmin, zmax)?

* if the user wants to query, if a ceratin vec3 position lies inside a Drawable object, can this be done with something like: "myDrawableObject.getBound().contains(osg::Vec3f(...))"?

* if the user has a non-rectangluar polygon (e.g. an area in form of pentagram), will the above also work? if not, can you give me a hint how to implement an adequate contains()-query?


thanks in advance,
christian

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








More information about the osg-users mailing list