Castor3D
..
|
Class which represents the moving things. More...
Classes | |
class | BinaryParser |
MovingObjectBase binary loader. More... | |
Public Member Functions | |
virtual C3D_API | ~AnimationObject () |
Destructor. More... | |
C3D_API void | AddChild (AnimationObjectSPtr p_object) |
Adds a child to this object. More... | |
C3D_API void | Update (real p_time, Castor::Matrix4x4r const &p_transformations) |
Updates the object, applies the transformations at given time. More... | |
virtual C3D_API Castor::String const & | GetName () const =0 |
Retrieves the object name. More... | |
C3D_API KeyFrame & | AddKeyFrame (real p_from, Castor::Point3r const &p_translate=Castor::Point3r{}, Castor::Quaternion const &p_rotate=Castor::Quaternion{}, Castor::Point3r const &p_scale=Castor::Point3r{ 1.0_r, 1.0_r, 1.0_r }) |
Creates a scaling key frame and adds it to the list. More... | |
C3D_API void | RemoveKeyFrame (real p_time) |
Deletes the scaling key frame at time index p_time. More... | |
C3D_API void | SetInterpolationMode (eINTERPOLATOR_MODE p_mode) |
C3D_API AnimationObjectSPtr | Clone (Animation &p_animation) |
Clones this moving thing. More... | |
eINTERPOLATOR_MODE | GetInterpolationMode () const |
KeyFrameArray const & | GetKeyFrames () const |
real | GetLength () const |
eANIMATION_OBJECT_TYPE | GetType () const |
void | SetLength (real p_length) |
Sets the animation length. More... | |
Castor::Matrix4x4r const & | GetFinalTransform () const |
The final object's animations transformation. More... | |
Castor::Matrix4x4r const & | GetNodeTransform () const |
Retrieves the animation node transformation. More... | |
void | SetNodeTransform (Castor::Matrix4x4r const &p_transform) |
Sets the animation node transformation. More... | |
bool | HasKeyFrames () const |
Tells whether or not the object has keyframes. More... | |
AnimationObjectPtrArray const & | GetChildren () const |
Protected Member Functions | |
C3D_API | AnimationObject (eANIMATION_OBJECT_TYPE p_type) |
Constructor. More... | |
C3D_API | AnimationObject (AnimationObject const &p_rhs) |
Copy constructor. More... | |
virtual C3D_API void | DoApply ()=0 |
Updates the object, applies the transformations matrix. More... | |
virtual C3D_API AnimationObjectSPtr | DoClone (Animation &p_animation)=0 |
Clones this moving thing. More... | |
Protected Attributes | |
eANIMATION_OBJECT_TYPE | m_type |
The moving thing type. More... | |
eINTERPOLATOR_MODE | m_mode = eINTERPOLATOR_MODE_NONE |
The interpolation mode. More... | |
std::unique_ptr< Point3rInterpolator > | m_pointInterpolator |
The point interpolator. More... | |
std::unique_ptr< QuaternionInterpolator > | m_quaternionInterpolator |
The quaternion interpolator. More... | |
KeyFrameArray | m_keyframes |
The key frames. More... | |
KeyFrameArray::const_iterator | m_prev |
Iterator to the previous keyframe (when playing the animation). More... | |
KeyFrameArray::const_iterator | m_curr |
Iterator to the current keyframe (when playing the animation). More... | |
Castor::Matrix4x4r | m_nodeTransform |
Animation node transformations. More... | |
real | m_length |
The animation length. More... | |
AnimationObjectPtrArray | m_children |
The objects depending on this one. More... | |
Castor::Matrix4x4r | m_cumulativeTransform |
The cumulative animation transformations. More... | |
Castor::Matrix4x4r | m_finalTransform |
The matrix holding transformation at current time. More... | |
Class which represents the moving things.
|
protected |
Constructor.
[in] | p_type | The moving thing type. |
|
protected |
Copy constructor.
|
virtual |
Destructor.
C3D_API void Castor3D::AnimationObject::AddChild | ( | AnimationObjectSPtr | p_object | ) |
Adds a child to this object.
[in] | p_object | The child. |
C3D_API KeyFrame& Castor3D::AnimationObject::AddKeyFrame | ( | real | p_from, |
Castor::Point3r const & | p_translate = Castor::Point3r{} , |
||
Castor::Quaternion const & | p_rotate = Castor::Quaternion{} , |
||
Castor::Point3r const & | p_scale = Castor::Point3r{ 1.0_r, 1.0_r, 1.0_r } |
||
) |
Creates a scaling key frame and adds it to the list.
[in] | p_from | The starting time. |
[in] | p_translate | The translation at start time. |
[in] | p_rotate | The rotation at start time. |
[in] | p_scale | The scaling at start time. |
C3D_API AnimationObjectSPtr Castor3D::AnimationObject::Clone | ( | Animation & | p_animation | ) |
Clones this moving thing.
[out] | p_animation | The clone is added to this animation. |
|
protectedpure virtual |
Updates the object, applies the transformations matrix.
|
protectedpure virtual |
Clones this moving thing.
[out] | p_animation | The clone is added to this animation. |
|
inline |
References m_children.
|
inline |
The final object's animations transformation.
References m_finalTransform.
|
inline |
References m_mode.
|
inline |
References m_keyframes.
|
inline |
References m_length.
|
pure virtual |
Retrieves the object name.
Implemented in Castor3D::SkeletonAnimationNode, Castor3D::SkeletonAnimationBone, and Castor3D::SkeletonAnimationObject.
|
inline |
|
inline |
References m_type.
|
inline |
Tells whether or not the object has keyframes.
false
if no keyframes. References m_keyframes.
C3D_API void Castor3D::AnimationObject::RemoveKeyFrame | ( | real | p_time | ) |
Deletes the scaling key frame at time index p_time.
[in] | p_time | The time index. |
C3D_API void Castor3D::AnimationObject::SetInterpolationMode | ( | eINTERPOLATOR_MODE | p_mode | ) |
|
inline |
|
inline |
Sets the animation node transformation.
[in] | p_transform | The new value. |
References m_nodeTransform.
C3D_API void Castor3D::AnimationObject::Update | ( | real | p_time, |
Castor::Matrix4x4r const & | p_transformations | ||
) |
Updates the object, applies the transformations at given time.
[in] | p_time | Current time index. |
[in] | p_transformations | The current transformation matrix. |
|
protected |
The objects depending on this one.
Referenced by GetChildren().
|
protected |
The cumulative animation transformations.
|
protected |
Iterator to the current keyframe (when playing the animation).
|
protected |
The matrix holding transformation at current time.
Referenced by GetFinalTransform().
|
protected |
The key frames.
Referenced by GetKeyFrames(), and HasKeyFrames().
|
protected |
The animation length.
Referenced by GetLength(), and SetLength().
|
protected |
The interpolation mode.
Referenced by GetInterpolationMode().
|
protected |
Animation node transformations.
Referenced by GetNodeTransform(), and SetNodeTransform().
|
protected |
The point interpolator.
|
protected |
Iterator to the previous keyframe (when playing the animation).
|
protected |
The quaternion interpolator.
|
protected |
The moving thing type.
Referenced by GetType().