Futher improvements and fixes to osg::AnimationPath, and the osglight

demo to show it action.
This commit is contained in:
Robert Osfield
2002-08-13 15:31:10 +00:00
parent 7c049360ff
commit f9cc8783b3
10 changed files with 175 additions and 172 deletions

View File

@@ -6,6 +6,7 @@
#define OSG_MATRIXTRANSFORM 1
#include <osg/Transform>
#include <osg/AnimationPath>
namespace osg {
@@ -78,6 +79,23 @@ class SG_EXPORT MatrixTransform : public Transform
return true;
}
/** Callback which can be attached to a MatrixTransform as an app
* callback to allow it to follow the path defined by a AnimationPath.*/
class AnimationPathCallback : public NodeCallback
{
public:
AnimationPathCallback(AnimationPath* ap):
_animationPath(ap),
_firstTime(0.0) {}
/** implements the callback*/
virtual void operator()(Node* node, NodeVisitor* nv);
ref_ptr<AnimationPath> _animationPath;
double _firstTime;
};
protected :
virtual ~MatrixTransform();