[osg-users] FindNodeVisitor Operation?

David Spilling david.spilling at gmail.com
Tue Jul 15 02:12:23 PDT 2008

Hi Ümit,

osg::DOFTransform is a subclass of the more general osg::MatrixTransform.

If I'm reading the intention of the model right, you have 2 MatrixTransform
nodes - named "*3DSPIVOTPOINT: Rotate*" and "*3DSPIVOTPOINT: Translate
pivotpoint to (world) origin*" above some geometry "*1_planetar*". (Although
your top level group has 6 other unlisted children as well).

If you want to move/rotate/translate 1_planetar, use the NodeVisitor to find
one of your two MatrixTransform nodes, and then set the transform's matrix
yourself (via setMatrix(osg::Matrix& myMatrix)). You will need to fill in
the values of the matrix yourself based on what you want to do, but there
are many many ways of doing this (makeRotate, makeTranslate, makeLookAt

Alternatively, if you really want to use DOFTransform type methods, you
could dynamic_cast the found MatrixTransform to a DOFTransform.

Hope that helps,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/1af9c716/attachment-0003.htm>

More information about the osg-users mailing list