Classes derived from NodeCallback are attached to nodes in the scene graph and 
operated during a scene graph traversal.  Since the class you've posted is 
named CameraUpdateCallback, I'm guessing it is added using the 
setUpdateCallback method.  During the update traversal of the scene, the update 
visitor calls the operator()(osg::Node* n, osg::NodeVisitor* nv) method.  Since 
the callback is attached to a Camera node, n can be cast to a pointer to the 
Camera.  The view and projection matrices of the camera are set based on the 
view and projection matrices of some other camera (mOtherCamera).

So to answer your final questions, it is operated during the update traversal 
(until it is removed from the Camera node, if that ever happens), and it 
operates on whichever node in the scene graph that it is attached to.

Cheers,
Tom

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





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

Reply via email to