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:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user