5#ifndef NIRT_I_SCENE_NODE_ANIMATOR_HPP_INCLUDED
6#define NIRT_I_SCENE_NODE_ANIMATOR_HPP_INCLUDED
8#include <nirtcpp/core/engine/IReferenceCounted.hpp>
9#include <nirtcpp/core/engine/vector3d.hpp>
10#include <nirtcpp/core/engine/ESceneNodeAnimatorTypes.hpp>
11#include <nirtcpp/core/engine/IAttributeExchangingObject.hpp>
12#include <nirtcpp/core/engine/IAttributes.hpp>
13#include <nirtcpp/core/engine/IEventReceiver.hpp>
112 if ( enabled == IsEnabled )
126 virtual bool isEnabled()
const
134 out->
addBool(
"IsEnabled", IsEnabled);
153 IsEnabled = toCopyFrom->IsEnabled;
Interface of an object which can receive events.
Definition IEventReceiver.hpp:484
SEvents hold information about an event. See nirt::IEventReceiver for details on event handling.
Definition IEventReceiver.hpp:282
An object which is able to serialize and deserialize its attributes into an attributes object.
Definition IAttributeExchangingObject.hpp:54
Provides a generic interface for attributes and their values and the possibility to serialize them.
Definition IAttributes.hpp:42
virtual bool getAttributeAsBool(const c8 *attributeName, bool defaultNotFound=false) const =0
virtual void addBool(const c8 *attributeName, bool value)=0
Adds an attribute as bool.
class holding data describing options
Definition IAttributeExchangingObject.hpp:35
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
Animates a scene node. Can animate position, rotation, material, and so on.
Definition ISceneNodeAnimator.hpp:32
virtual void setEnabled(bool enabled, u32 timeNow=0)
Sets the enabled state of this element.
Definition ISceneNodeAnimator.hpp:110
virtual bool hasFinished(void) const
Returns if the animator has finished.
Definition ISceneNodeAnimator.hpp:72
virtual bool OnEvent(const SEvent &event) override
Event receiver, override this function for camera controlling animators.
Definition ISceneNodeAnimator.hpp:58
u32 PauseTimeSum
Only enabled animators are updated.
Definition ISceneNodeAnimator.hpp:160
virtual void setStartTime(u32 time, bool resetPauseTime=true)
Reset a time-based movement by changing the starttime.
Definition ISceneNodeAnimator.hpp:84
void cloneMembers(const ISceneNodeAnimator *toCopyFrom)
Definition ISceneNodeAnimator.hpp:151
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const
Returns type of the scene node animator.
Definition ISceneNodeAnimator.hpp:64
virtual void animateNode(ISceneNode *node, u32 timeMs)=0
Animates a scene node.
virtual ISceneNodeAnimator * createClone(ISceneNode *node, ISceneManager *newManager=0)=0
Creates a clone of this animator.
virtual void deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options=0) override
Reads attributes of the scene node animator.
Definition ISceneNodeAnimator.hpp:139
virtual nirt::u32 getStartTime() const
Get the starttime.
Definition ISceneNodeAnimator.hpp:96
virtual void serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const override
Writes attributes of the scene node animator.
Definition ISceneNodeAnimator.hpp:132
u32 PauseTimeStart
Sum up time which the animator was disabled.
Definition ISceneNodeAnimator.hpp:161
u32 StartTime
Last time setEnabled(false) was called with a timer > 0.
Definition ISceneNodeAnimator.hpp:162
virtual bool isEventReceiverEnabled() const
Returns true if this animator receives events.
Definition ISceneNodeAnimator.hpp:52
Scene node interface.
Definition ISceneNode.hpp:43
ESCENE_NODE_ANIMATOR_TYPE
An enumeration for all types of built-in scene node animators.
Definition ESceneNodeAnimatorTypes.hpp:15
@ ESNAT_UNKNOWN
Unknown scene node animator.
Definition ESceneNodeAnimatorTypes.hpp:47
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64