[osg-users] NewB questions about osg

Alberto Luaces aluaces at udc.es
Tue Nov 24 03:03:03 PST 2009

Hi Priyank,

see the answers below:

"Priyank Jain" writes:

> Hi,
> I just started using openScenegraph and it has been pretty smooth for me till now. I am making a simple racquet-ball game for my VR class (using a CAVE system). I have some basic questions to ask..
> 1. What coordinate system does OSG follow ?
> Right handed, I presume ? Also, x points to East ? Y up or into the screen ? I couldn't find the thumb diagram on the website. Can you guys please refer me to the right convention or link ?

Right handed with Z axis for the "up" axis. Of course you can change
this at will by changing your camera orientation.

> 2. How do I generate Bounding box/ bounding sphere for a given box/ sphere geometry? Can this information be embedded in the model and extracted using any of the plugins ?

Those entities are already computed since OSG needs them for culling
purposes. You can get the bounding sphere of any node with osg::Node::getBound()


and the bounding box of any geode with osg::Geode::getBoundingBox():


> 3. Is there something pre-defined for collision detection-resolution wrt Bounding box and bounding sphere in osg ?

Check the methods for osg::BoundingBox and osg::BoundingSphere: you can
test them for intersections or even convert a osg::BoundingBox to an
osg::BoundingSphere and then make your intersection test.




More information about the osg-users mailing list