Commit 6ece9e0d authored by hybrid's avatar hybrid

Clarification of parameter unit.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2229 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 868d73e2
......@@ -1047,12 +1047,12 @@ namespace scene
virtual void drawAll() = 0;
//! Creates a rotation animator, which rotates the attached scene node around itself.
/** \param rotationPerSecond: Specifies the speed of the animation
/** \param rotationSpeed Specifies the speed of the animation in degree per 10 milliseconds.
\return The animator. Attach it to a scene node with ISceneNode::addAnimator()
and the animator will animate it.
If you no longer need the animator, you should call ISceneNodeAnimator::drop().
See IReferenceCounted::drop() for more information. */
virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationPerSecond) = 0;
virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationSpeed) = 0;
//! Creates a fly circle animator, which lets the attached scene node fly around a center.
/** \param center: Center of the circle.
......
......@@ -19,13 +19,6 @@ CSceneNodeAnimatorRotation::CSceneNodeAnimatorRotation(u32 time, const core::vec
}
//! destructor
CSceneNodeAnimatorRotation::~CSceneNodeAnimatorRotation()
{
}
//! animates a scene node
void CSceneNodeAnimatorRotation::animateNode(ISceneNode* node, u32 timeMs)
{
......@@ -35,9 +28,7 @@ void CSceneNodeAnimatorRotation::animateNode(ISceneNode* node, u32 timeMs)
if (diffTime != 0)
{
core::vector3df NewRotation = node->getRotation();
NewRotation += Rotation* ((diffTime)/10.0f);
node->setRotation(NewRotation);
node->setRotation(node->getRotation() + Rotation*(diffTime*0.1f));
StartTime=timeMs;
}
}
......@@ -50,12 +41,14 @@ void CSceneNodeAnimatorRotation::serializeAttributes(io::IAttributes* out, io::S
out->addVector3d("Rotation", Rotation);
}
//! Reads attributes of the scene node animator.
void CSceneNodeAnimatorRotation::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
{
Rotation = in->getAttributeAsVector3d("Rotation");
}
ISceneNodeAnimator* CSceneNodeAnimatorRotation::createClone(ISceneNode* node, ISceneManager* newManager)
{
CSceneNodeAnimatorRotation * newAnimator =
......@@ -64,6 +57,7 @@ ISceneNodeAnimator* CSceneNodeAnimatorRotation::createClone(ISceneNode* node, IS
return newAnimator;
}
} // end namespace scene
} // end namespace irr
......@@ -18,9 +18,6 @@ namespace scene
//! constructor
CSceneNodeAnimatorRotation(u32 time, const core::vector3df& rotation);
//! destructor
virtual ~CSceneNodeAnimatorRotation();
//! animates a scene node
virtual void animateNode(ISceneNode* node, u32 timeMs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment