Add IAnimatedMeshSceneNode::getLoopMode (asked for by JLouisB)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4259 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2012-07-28 10:32:08 +00:00
parent d7b9290902
commit 2d13027a9c
4 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,7 @@
Changes in 1.8 (??.??.2011)
- Add IAnimatedMeshSceneNode::getLoopMode (asked for by JLouisB)
- CSceneNodeAnimatorCameraFPS now resets the key-input when it was disabled (thx @ gerdb for reporting and patch-proposal)
- Properly destroy OpenGL resources on linux (thx @curaga for the patch)

View File

@ -166,6 +166,10 @@ namespace scene
/** If set to false, animations will not be played looped. */
virtual void setLoopMode(bool playAnimationLooped) = 0;
//! returns the current loop mode
/** When true the animations are played looped */
virtual bool getLoopMode() const = 0;
//! Sets a callback interface which will be called if an animation playback has ended.
/** Set this to 0 to disable the callback again.
Please note that this will only be called when in non looped

View File

@ -244,7 +244,7 @@ void CAnimatedMeshSceneNode::OnAnimate(u32 timeMs)
LastTimeMs = timeMs;
}
// set CurrentFrameNr
// set CurrentFrameNr
buildFrameNr(timeMs-LastTimeMs);
// update bbox
@ -735,6 +735,12 @@ void CAnimatedMeshSceneNode::setLoopMode(bool playAnimationLooped)
Looping = playAnimationLooped;
}
//! returns the current loop mode
bool CAnimatedMeshSceneNode::getLoopMode() const
{
return Looping;
}
//! Sets a callback interface which will be called if an animation
//! playback has ended. Set this to 0 to disable the callback again.

View File

@ -53,6 +53,9 @@ namespace scene
//! animations will not be looped.
virtual void setLoopMode(bool playAnimationLooped);
//! returns the current loop mode
virtual bool getLoopMode() const;
//! Sets a callback interface which will be called if an animation
//! playback has ended. Set this to 0 to disable the callback again.
virtual void setAnimationEndCallback(IAnimationEndCallBack* callback=0);