Hi Francesco,

You just need to write a NodeVisitor that traverses through the scene
and detects the osg::Switch and osgSim::DOFTransform.  The NodeVisitor
has an apply(osg::Switch&) method, but not a DOFTransform one so
you'll need to implement and apply(osg::Transform&) and then
dynamic_cast this to a DOFTransform to find out whether the transform
is a DOFTransform.

There are many examples of subclasses from NodeVisitor and their usage
in the OSG sources, as well as the tutorials so review these for
further guidance on what custom NodeVisitor look like.

Robert.

On Fri, Jan 9, 2009 at 2:42 PM, Francesco Argese <[email protected]> wrote:
> Hi all,
>
> I have a application that load some 3D models in .flt format. This
> models include both switches and Dof and I like to enable it.
>
> To do so i have done a research in OpenSceneGraph documentation and I
> have found the tutorials regarding the argument (in particular [1]).
>
> It works well but I prefer, if it could be possible, to find how many
> switch and dof nodes there are in a model and recover a pointer to
> them without knowing their name. In this manner I could configure my
> application changing models without take care of the name given to the
> particular switches and dof.
>
> I'm with version 1.2 of OSG.
>
> Is it possible to do so?
>
> Thanks in advance
> Francesco Argese
>
> [1] 
> http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/FindingNodes
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to