Francesco Argese wrote:
Hi guys,

i begin thanking you: I have resolved the problem regarding the
research of dof and switch nodes in my flt models: now I have a vector
containing all the pointers to switches and dof and i need to activate
them.

Following the OSG FAQ [1], I have found that a method to enable DOF
nodes is to use method setAnimationOn( true ) on my DOFTransform. I
have tried this but it give no effect to the scene. I have tried also
the function animate() but it doesn't produce any result. What these
two functions do?

At the moment I'm enabling the dof node towards
setCurrentHPR(osg::Vec3(...)) and it works well, but i like to reduce
the amount of code if there is another method to do so already
integrated in OpenSceneGraph.

I'm not sure about this, I've never used those functions.


Another thing: what is the function to change osg::MultiSwitch value?

I assume you mean osgSim::MultiSwitch.  This is a slightly complex question.

MultiSwitches, like regular Switches can enable or disable the traversal and rendering of their children. The difference between an osg::Switch and an osgSim::MultiSwitch is that a MultiSwitch can store a list of different ways to configure the switch. For example, you can have one setting that has children 1 and 3 on, and a second one that has children 2, 4, and 5, on. OpenFlight calls these "masks" (in Creator, you add a mask to the Switch node, and you can then enable or disable children within that mask). OSG calls them "switch sets". There is a method setChildValue(), which takes a switch set index, a child index, and a boolean value. This lets you enable or disable a child within a particular switch set. There is also a method called setActiveSwitchSet(), which lets you tell the MultiSwitch which switch set to use.

Hope this answers your question instead of confusing you more  :-)

--"J"


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

Reply via email to