Added the support in AnimationPathCallback for taking a pivot, axis and rotation rate

paramters in its constructor to allow it to be used to create rotations around a point.
This provides the same interface and functionality as osgUtil::TransformCallback but
has the advantage and AnimationPathCallback is fully supported by the .osg and .ive file formats.
This commit is contained in:
Robert Osfield
2005-11-09 15:11:22 +00:00
parent ac0a6a6ac5
commit 83d492162e
13 changed files with 48 additions and 23 deletions

View File

@@ -237,6 +237,7 @@ class OSG_EXPORT AnimationPathCallback : public NodeCallback
META_Object(osg,AnimationPathCallback);
/** Construct an AnimationPathCallback with a specified animation path.*/
AnimationPathCallback(AnimationPath* ap,double timeOffset=0.0,double timeMultiplier=1.0):
_animationPath(ap),
_pivotPoint(0.0,0.0,0.0),
@@ -248,6 +249,9 @@ class OSG_EXPORT AnimationPathCallback : public NodeCallback
_pause(false),
_pauseTime(0.0) {}
/** Construct an AnimationPathCallback and automatical create an animation path to produce a rotation about a point.*/
AnimationPathCallback(const osg::Vec3d& pivot,const osg::Vec3d& axis,float angularVelocity);
void setAnimationPath(AnimationPath* path) { _animationPath = path; }
AnimationPath* getAnimationPath() { return _animationPath.get(); }