Castor3D 0.16.0
Multiplatform 3D engine
|
Animation base class. More...
#include <Animation.hpp>
Public Member Functions | |
AnimationT (AnimableHandlerT &handler, AnimationType type, AnimableT< AnimableHandlerT > &animable, castor::String const &name=castor::cuEmptyString) | |
Constructor. | |
AnimationT (AnimableHandlerT &handler, AnimationType type, castor::String const &name=castor::cuEmptyString) | |
Constructor. | |
void | addKeyFrame (AnimationKeyFrameUPtr keyFrame) |
Adds a keyframe to the animation. | |
AnimationKeyFrameArray::iterator | find (castor::Milliseconds const &time) |
Finds a keyframe given a time index. | |
void | findKeyFrame (castor::Milliseconds const &time, AnimationKeyFrameArray::iterator &prv, AnimationKeyFrameArray::iterator &cur) const |
Finds a keyframe given a time index. | |
void | updateLength () |
Updates the animation length. | |
bool | isEmpty () const |
size_t | size () const |
AnimationKeyFrameArray::const_iterator | begin () const |
AnimationKeyFrameArray::iterator | begin () |
AnimationKeyFrameArray::const_iterator | end () const |
AnimationKeyFrameArray::iterator | end () |
AnimationType | getType () const |
castor::Milliseconds const & | getLength () const |
AnimableT< AnimableHandlerT > * | getAnimable () const |
C3D_API | AnimationT (AnimationT &&rhs) noexcept=default |
C3D_API AnimationT & | operator= (AnimationT &&rhs) noexcept=delete |
C3D_API | AnimationT (AnimationT const &rhs)=delete |
C3D_API AnimationT & | operator= (AnimationT const &rhs)=delete |
virtual C3D_API | ~AnimationT () noexcept=default |
Public Member Functions inherited from castor::NamedBaseT< T > | |
NamedBaseT (T name) noexcept | |
Constructor. | |
T const & | getName () const noexcept |
Retrieves the name. | |
void | rename (T name) noexcept |
Public Member Functions inherited from castor::OwnedBy< AnimableHandlerT > | |
AnimableHandlerT * | getOwner () const |
Protected Attributes | |
AnimableT< AnimableHandlerT > * | m_animable {} |
AnimationType | m_type { AnimationType::eCount } |
castor::Milliseconds | m_length { 0 } |
AnimationKeyFrameArray | m_keyframes |
Protected Attributes inherited from castor::NamedBaseT< T > | |
T | m_name |
Friends | |
class | BinaryWriter< AnimationT > |
class | BinaryParser< AnimationT > |
Additional Inherited Members | |
Protected Member Functions inherited from castor::OwnedBy< AnimableHandlerT > | |
OwnedBy (AnimableHandlerT &owner) | |
Constructor. | |
Animation base class.
|
defaultnoexcept |
name Copy / Move.
|
delete |
|
virtualdefaultnoexcept |
castor3d::AnimationT< AnimableHandlerT >::AnimationT | ( | AnimableHandlerT & | handler, |
AnimationType | type, | ||
AnimableT< AnimableHandlerT > & | animable, | ||
castor::String const & | name = castor::cuEmptyString ) |
Constructor.
[in] | handler | The parent handler. |
[in] | type | The type of the animation. |
[in] | animable | The parent animable object. |
[in] | name | The name of the animation. |
castor3d::AnimationT< AnimableHandlerT >::AnimationT | ( | AnimableHandlerT & | handler, |
AnimationType | type, | ||
castor::String const & | name = castor::cuEmptyString ) |
Constructor.
[in] | handler | The parent handler. |
[in] | type | The type of the animation. |
[in] | name | The name of the animation. |
void castor3d::AnimationT< AnimableHandlerT >::addKeyFrame | ( | AnimationKeyFrameUPtr | keyFrame | ) |
Adds a keyframe to the animation.
[in] | keyFrame | The keyframe. |
|
inline |
References castor3d::AnimationT< AnimableHandlerT >::m_keyframes.
|
inline |
References castor3d::AnimationT< AnimableHandlerT >::m_keyframes.
|
inline |
References castor3d::AnimationT< AnimableHandlerT >::m_keyframes.
|
inline |
References castor3d::AnimationT< AnimableHandlerT >::m_keyframes.
AnimationKeyFrameArray::iterator castor3d::AnimationT< AnimableHandlerT >::find | ( | castor::Milliseconds const & | time | ) |
Finds a keyframe given a time index.
[in] | time | The time index. |
void castor3d::AnimationT< AnimableHandlerT >::findKeyFrame | ( | castor::Milliseconds const & | time, |
AnimationKeyFrameArray::iterator & | prv, | ||
AnimationKeyFrameArray::iterator & | cur ) const |
Finds a keyframe given a time index.
[in] | time | The time index. |
[in,out] | prv | The previous keyframe, receives the new previous keyframe, if there is a change. |
[in,out] | cur | Receives the current keyframe, receives the new current keyframe, if there is a change. |
|
inline |
|
inline |
References castor3d::AnimationT< AnimableHandlerT >::m_length.
|
inline |
References castor3d::AnimationT< AnimableHandlerT >::m_type.
|
inline |
true
if the key frames list is empty. References castor3d::AnimationT< AnimableHandlerT >::m_keyframes.
|
deletenoexcept |
|
delete |
|
inline |
References castor3d::AnimationT< AnimableHandlerT >::m_keyframes.
void castor3d::AnimationT< AnimableHandlerT >::updateLength | ( | ) |
Updates the animation length.
|
friend |
|
friend |
|
protected |
Referenced by castor3d::AnimationT< AnimableHandlerT >::getAnimable().
|
protected |
The key frames.
Referenced by castor3d::AnimationT< AnimableHandlerT >::begin(), castor3d::AnimationT< AnimableHandlerT >::begin(), castor3d::AnimationT< AnimableHandlerT >::end(), castor3d::AnimationT< AnimableHandlerT >::end(), castor3d::AnimationT< AnimableHandlerT >::isEmpty(), and castor3d::AnimationT< AnimableHandlerT >::size().
|
protected |
The animation length.
Referenced by castor3d::AnimationT< AnimableHandlerT >::getLength().
|
protected |
The animation type.
Referenced by castor3d::AnimationT< AnimableHandlerT >::getType().