Hi Alberto,
There isn't lazy updating of the control point in
AnimationPathCallback, as you've found it'll compute the control point
on demand. Attach a single callback to many nodes is not typical
practice so such a lazy updating technique wouldn't be critical to
most. It'd be easy to add though by just modifying the
AnimationPathCallback::update(Node& node) method to something like:
void AnimationPathCallback::update(osg::Node& node)
{
if (_cpCacheTime!=getAnimationTime())
{
_animationPath->getInterpolatedControlPoint(getAnimationTime(),_cpCached);
_cpCacheTime =getAnimationTime();
}
AnimationPathCallbackVisitor apcv(_cpCached,_pivotPoint,_useInverseMatrix);
node.accept(apcv);
}
Feel free to code such a change, and if it works out fine for you to
submit it to osg-submissions.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org