Creating the scene-graph is just the first step, and not really useful in itself. Something needs to be done with it. Actions on the graph usually take the form of a traversal which goes through the nodes one by one and calls an appropriate action for each one on the way.
These are called Actions in OpenSG, and there are a number of predefined actions:
To execute an action on a graph you apply it to the graph (action->apply(graph);) or to a list of nodes (action->apply(vector<NodePtr>::iterator begin, vector<NodePtr>::iterator end);).
To use it just create one and pass it to the OpenSG Window object (see Window).
It is possible to turn the view volume culling off using the setFrustumCulling() method. For debugging it is possible to turn the frustum update off (setAutoFrustum()) and to make the system render the tested bounding volumes (setVolumeDraw()).
A ray is defined by a Line (see osg::Line) and optionally a maximum distance. It can either be set at construction time or by setLine(). To test the ray for intersection, apply the action to the root of the possible intersection objects.
If the ray hits an object didHit() will return true. In that case, detailed info about what was hit and where can be accessed through getHitT(), getHitPoint(), getHitObject() and getHitTriangle().
traverse() takes a NodePtr to define the graph and a functor to define the function to be called for every node as parameters. The functor just gets the traversed node as a parameter
If you really need to do your own action take a look at IntersectAction, it shows what you need to implement. Talk to us before you do it, though, maybe the redesign is already usable so you can base your new stuff on that.
1.5.5