Castor3D
..
|
Classes | |
class | BinaryParser |
Animation binary loader. More... | |
Public Member Functions | |
C3D_API | Animation (Castor::String const &p_name=Castor::cuEmptyString) |
Constructor. More... | |
C3D_API | ~Animation () |
Destructor. More... | |
C3D_API void | Update (real p_tslf) |
Updates the animation, updates the key frame at the good time index. More... | |
C3D_API void | Play () |
Plays the animation. More... | |
C3D_API void | Pause () |
Pauses the animation. More... | |
C3D_API void | Stop () |
Stops the animation. More... | |
C3D_API AnimationObjectSPtr | AddObject (Castor::String const &p_name, AnimationObjectSPtr p_parent) |
Creates and adds a moving node. More... | |
C3D_API AnimationObjectSPtr | AddObject (GeometrySPtr p_object, AnimationObjectSPtr p_parent) |
Creates and adds a moving object. More... | |
C3D_API AnimationObjectSPtr | AddObject (BoneSPtr p_bone, AnimationObjectSPtr p_parent) |
Creates and adds a moving bone. More... | |
C3D_API void | AddObject (AnimationObjectSPtr p_object, AnimationObjectSPtr p_parent) |
Adds an animated object. More... | |
C3D_API bool | HasObject (eANIMATION_OBJECT_TYPE p_type, Castor::String const &p_name) const |
Tells if the animation has the animated object. More... | |
C3D_API AnimationObjectSPtr | GetObject (MovableObjectSPtr p_object) const |
Retrieves an animated object. More... | |
C3D_API AnimationObjectSPtr | GetObject (BoneSPtr p_bone) const |
Retrieves an animated bone. More... | |
C3D_API void | SetInterpolationMode (eINTERPOLATOR_MODE p_mode) |
C3D_API AnimationSPtr | Clone () const |
Clones this animation. More... | |
eANIMATION_STATE | GetState () const |
Retrieves the animation state. More... | |
real | GetScale () const |
Retrieves the animation time scale. More... | |
bool | IsLooped () const |
Retrieves the animation loop status. More... | |
void | SetScale (real p_scale) |
Sets the animation time scale. More... | |
void | SetLooped (bool p_looped) |
Sets the animation loop status. More... | |
AnimationObjectPtrStrMap const & | GetObjects () const |
Retrieves the moving objects count. More... | |
Protected Attributes | |
real | m_currentTime |
The current playing time. More... | |
eANIMATION_STATE | m_state |
The current state of the animation. More... | |
real | m_scale |
The animation time scale. More... | |
real | m_length |
The animation length. More... | |
bool | m_looped |
Tells whether or not the animation is looped. More... | |
AnimationObjectPtrArray | m_arrayMoving |
The parent moving objects. More... | |
AnimationObjectPtrStrMap | m_toMove |
The moving objects. More... | |
Animation class.
C3D_API Castor3D::Animation::Animation | ( | Castor::String const & | p_name = Castor::cuEmptyString | ) |
Constructor.
[in] | p_name | The name of the animation. |
C3D_API Castor3D::Animation::~Animation | ( | ) |
Destructor.
C3D_API AnimationObjectSPtr Castor3D::Animation::AddObject | ( | Castor::String const & | p_name, |
AnimationObjectSPtr | p_parent | ||
) |
Creates and adds a moving node.
[in] | p_name | The node name. |
[in] | p_parent | The moving object's parent. |
C3D_API AnimationObjectSPtr Castor3D::Animation::AddObject | ( | GeometrySPtr | p_object, |
AnimationObjectSPtr | p_parent | ||
) |
Creates and adds a moving object.
[in] | p_object | The moving object to add. |
[in] | p_parent | The moving object's parent. |
C3D_API AnimationObjectSPtr Castor3D::Animation::AddObject | ( | BoneSPtr | p_bone, |
AnimationObjectSPtr | p_parent | ||
) |
Creates and adds a moving bone.
[in] | p_bone | The bone to add. |
[in] | p_parent | The moving object's parent. |
C3D_API void Castor3D::Animation::AddObject | ( | AnimationObjectSPtr | p_object, |
AnimationObjectSPtr | p_parent | ||
) |
Adds an animated object.
[in] | p_object | The animated object to add. |
[in] | p_parent | The moving object's parent. |
C3D_API AnimationSPtr Castor3D::Animation::Clone | ( | ) | const |
Clones this animation.
C3D_API AnimationObjectSPtr Castor3D::Animation::GetObject | ( | MovableObjectSPtr | p_object | ) | const |
Retrieves an animated object.
[in] | p_object | The movable object to add. |
C3D_API AnimationObjectSPtr Castor3D::Animation::GetObject | ( | BoneSPtr | p_bone | ) | const |
Retrieves an animated bone.
[in] | p_bone | The bone. |
|
inline |
|
inline |
|
inline |
C3D_API bool Castor3D::Animation::HasObject | ( | eANIMATION_OBJECT_TYPE | p_type, |
Castor::String const & | p_name | ||
) | const |
Tells if the animation has the animated object.
[in] | p_type | The object type. |
[in] | p_name | The object name. |
|
inline |
C3D_API void Castor3D::Animation::Pause | ( | ) |
Pauses the animation.
C3D_API void Castor3D::Animation::Play | ( | ) |
Plays the animation.
C3D_API void Castor3D::Animation::SetInterpolationMode | ( | eINTERPOLATOR_MODE | p_mode | ) |
|
inline |
|
inline |
C3D_API void Castor3D::Animation::Stop | ( | ) |
Stops the animation.
C3D_API void Castor3D::Animation::Update | ( | real | p_tslf | ) |
Updates the animation, updates the key frame at the good time index.
[in] | p_tslf | The time since the last frame. |
|
protected |
The parent moving objects.
|
protected |
The current playing time.
|
protected |
The animation length.
|
protected |
Tells whether or not the animation is looped.
Referenced by IsLooped(), and SetLooped().
|
protected |
The animation time scale.
Referenced by GetScale(), and SetScale().
|
protected |
The current state of the animation.
Referenced by GetState().
|
protected |
The moving objects.
Referenced by GetObjects().