arsa
2.7
|
Animates a scene node. Can animate position, rotation, material, and so on. More...
#include <ISceneNodeAnimator.h>
Public Member Functions | |
ISceneNodeAnimator () | |
virtual void | animateNode (ISceneNode *node, u32 timeMs)=0 |
Animates a scene node. More... | |
virtual ISceneNodeAnimator * | createClone (ISceneNode *node, ISceneManager *newManager=0)=0 |
Creates a clone of this animator. More... | |
virtual bool | isEventReceiverEnabled () const |
Returns true if this animator receives events. More... | |
virtual bool | OnEvent (const SEvent &event) _IRR_OVERRIDE_ |
Event receiver, override this function for camera controlling animators. More... | |
virtual ESCENE_NODE_ANIMATOR_TYPE | getType () const |
Returns type of the scene node animator. More... | |
virtual bool | hasFinished (void) const |
Returns if the animator has finished. More... | |
virtual void | setStartTime (u32 time, bool resetPauseTime=true) |
Reset a time-based movement by changing the starttime. More... | |
virtual irr::u32 | getStartTime () const |
Get the starttime. More... | |
virtual void | setEnabled (bool enabled, u32 timeNow=0) |
Sets the enabled state of this element. More... | |
virtual bool | isEnabled () const |
virtual void | serializeAttributes (io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const _IRR_OVERRIDE_ |
Writes attributes of the scene node animator. More... | |
virtual void | deserializeAttributes (io::IAttributes *in, io::SAttributeReadWriteOptions *options=0) _IRR_OVERRIDE_ |
Reads attributes of the scene node animator. More... | |
Public Member Functions inherited from irr::IReferenceCounted | |
IReferenceCounted () | |
Constructor. More... | |
virtual | ~IReferenceCounted () |
Destructor. More... | |
void | grab () const |
Grabs the object. Increments the reference counter by one. More... | |
bool | drop () const |
Drops the object. Decrements the reference counter by one. More... | |
s32 | getReferenceCount () const |
Get the reference count. More... | |
const c8 * | getDebugName () const |
Returns the debug name of the object. More... | |
Public Member Functions inherited from irr::IEventReceiver | |
virtual | ~IEventReceiver () |
Destructor. More... | |
Protected Member Functions | |
void | cloneMembers (const ISceneNodeAnimator *toCopyFrom) |
Protected Member Functions inherited from irr::IReferenceCounted | |
void | setDebugName (const c8 *newName) |
Sets the debug name of the object. More... | |
Protected Attributes | |
bool | IsEnabled |
u32 | PauseTimeSum |
Only enabled animators are updated. More... | |
u32 | PauseTimeStart |
Sum up time which the animator was disabled. More... | |
u32 | StartTime |
Last time setEnabled(false) was called with a timer > 0. More... | |
Animates a scene node. Can animate position, rotation, material, and so on.
A scene node animator is able to animate a scene node in a very simple way. It may change its position, rotation, scale and/or material. There are lots of animators to choose from. You can create scene node animators with the ISceneManager interface.
Definition at line 31 of file ISceneNodeAnimator.h.
|
inline |
Definition at line 34 of file ISceneNodeAnimator.h.
|
pure virtual |
Animates a scene node.
node | Node to animate. |
timeMs | Current time in milliseconds. |
|
inlineprotected |
This method can be used by clone() implementations of derived classes
toCopyFrom | The animator from which the values are copied |
Definition at line 151 of file ISceneNodeAnimator.h.
|
pure virtual |
Creates a clone of this animator.
Please note that you will have to drop (IReferenceCounted::drop()) the returned pointer after calling this.
|
inlinevirtual |
Reads attributes of the scene node animator.
Reimplemented from irr::io::IAttributeExchangingObject.
Definition at line 139 of file ISceneNodeAnimator.h.
|
inlinevirtual |
Get the starttime.
This will return 0 for by animators which don't work with a starttime unless a starttime was manually set
Definition at line 96 of file ISceneNodeAnimator.h.
|
inlinevirtual |
|
inlinevirtual |
Returns if the animator has finished.
This is only valid for non-looping animators with a discrete end state.
Definition at line 72 of file ISceneNodeAnimator.h.
|
inlinevirtual |
Definition at line 126 of file ISceneNodeAnimator.h.
|
inlinevirtual |
Returns true if this animator receives events.
When attached to an active camera, this animator will be able to respond to events such as mouse and keyboard events.
Definition at line 52 of file ISceneNodeAnimator.h.
Event receiver, override this function for camera controlling animators.
Implements irr::IEventReceiver.
Definition at line 58 of file ISceneNodeAnimator.h.
|
inlinevirtual |
Writes attributes of the scene node animator.
Reimplemented from irr::io::IAttributeExchangingObject.
Definition at line 132 of file ISceneNodeAnimator.h.
|
inlinevirtual |
Sets the enabled state of this element.
enabled | When set to false ISceneNodes will not update the animator anymore. Animators themselves usually don't care. So manual calls to animateNode still work. |
timeNow | When set to values > 0 on enabling and disabling an internal timer will be increased by the time disabled time. Animator decide themselves how to handle that timer, but generally setting it will allow you to pause an animator, so it will continue at the same position when you enable it again. To use that pass irr::ITimer::getTime() as value. Animators with no timers will just ignore this. |
Definition at line 110 of file ISceneNodeAnimator.h.
|
inlinevirtual |
Reset a time-based movement by changing the starttime.
By default most animators start on object creation. This value is ignored by animators which don't work with a starttime. Known problems: CSceneNodeAnimatorRotation currently overwrites this value constantly (might be changed in the future).
time | Commonly you will use irr::ITimer::getTime(). |
resetPauseTime | Reset internal pause time for enabling/diabling animators as well |
Definition at line 84 of file ISceneNodeAnimator.h.
|
protected |
Definition at line 159 of file ISceneNodeAnimator.h.
|
protected |
Sum up time which the animator was disabled.
Definition at line 161 of file ISceneNodeAnimator.h.
|
protected |
Only enabled animators are updated.
Definition at line 160 of file ISceneNodeAnimator.h.
|
protected |
Last time setEnabled(false) was called with a timer > 0.
Definition at line 162 of file ISceneNodeAnimator.h.