This didn't work: updateVisitor->setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN); It takes the same amount of update time after this is called, even if I call this every frame. Is it possible to change DOFTransforms so that they don't require update traversal? I never set DOFs to animate.
Zach -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Sunday, February 04, 2007 06:34 To: osg users Subject: Re: [osg-users] DOFTransforms suck HI Zach, On 2/4/07, Zach Deedler <[EMAIL PROTECTED]> wrote: > PROBLEM > I have a scene where the Update traversal takes 9ms. It is basically > a scene with a bunch of vehicles with wheels modeled as DOFTransforms. > > INVESTIGATION > 1) I made a removeDOFTransform::Visitor. After I did this the update > traversal went down to 0.1ms. > > QUESTIONS > Q1) Why is the DOFTransform being visited when there are switch nodes > and LODs above it that turn it off? The default update visitor traverses all nodes in the scene graph that say they need visitation of the update traversal, the DOFTransform by default says requires updating so its'll be traversal. > Q2) Why do DOFTransforms register themselves to be visited in the > update traversal? Is it for the setAnimationOn function? Yes is because the DOFTransform can be animated. One possible optimization would be to only swtich on the need to update visitation when the animation is switch on. > Q3) Is there a way to turn off update traversal of the DOFs, or at > least when they are not switched or LOD'd on? Yes, updateVisitor->setTraversalMode(osg::NodeNivitor::TRAVERSE_ACTIVE_CHILDREN); Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
