Castor3D 0.17.0
Multiplatform 3D engine
Public Member Functions | Protected Attributes | Friends | List of all members
castor3d::Animation Class Referenceabstract

#include <Animation.hpp>

Inheritance diagram for castor3d::Animation:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Animation:
Collaboration graph
[legend]

Public Member Functions

C3D_API Animation (Engine &handler, AnimationType type, Animable &animable, castor::String const &name=castor::cuEmptyString)
 Constructor.
 
C3D_API Animation (Engine &handler, AnimationType type, castor::String const &name=castor::cuEmptyString)
 Constructor.
 
C3D_API void addKeyFrame (AnimationKeyFrameUPtr keyFrame)
 Adds a keyframe to the animation.
 
C3D_API AnimationKeyFrameArray::iterator find (castor::Milliseconds const &time)
 Finds a keyframe given a time index.
 
C3D_API void findKeyFrame (castor::Milliseconds const &time, AnimationKeyFrameArray::iterator &prv, AnimationKeyFrameArray::iterator &cur) const
 Finds a keyframe given a time index.
 
C3D_API void updateLength ()
 Updates the animation length.
 
C3D_API void cloneInto (Animation &output) const
 Clones this object into the given one.
 
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
 
AnimablegetAnimable () const
 
C3D_API Animation (Animation &&rhs) noexcept=default
 
C3D_API Animationoperator= (Animation &&rhs) noexcept=delete
 
C3D_API Animation (Animation const &rhs)=delete
 
C3D_API Animationoperator= (Animation const &rhs)=delete
 
virtual C3D_API ~Animation () 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< Engine >
Engine * getOwner () const noexcept
 
void setOwner (Engine &owner) noexcept
 

Protected Attributes

Animablem_animable {}
 
AnimationType m_type { AnimationType::eCount }
 
castor::Milliseconds m_length { 0 }
 
AnimationKeyFrameArray m_keyframes
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Friends

class BinaryWriter< Animation >
 
class BinaryParser< Animation >
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner) noexcept
 Constructor.
 

Constructor & Destructor Documentation

◆ Animation() [1/4]

C3D_API castor3d::Animation::Animation ( Animation && rhs)
defaultnoexcept

name Copy / Move.

◆ Animation() [2/4]

C3D_API castor3d::Animation::Animation ( Animation const & rhs)
delete

◆ ~Animation()

virtual C3D_API castor3d::Animation::~Animation ( )
virtualdefaultnoexcept

◆ Animation() [3/4]

C3D_API castor3d::Animation::Animation ( Engine & handler,
AnimationType type,
Animable & animable,
castor::String const & name = castor::cuEmptyString )

Constructor.

Parameters
[in]handlerThe parent handler.
[in]typeThe type of the animation.
[in]animableThe parent animable object.
[in]nameThe name of the animation.

◆ Animation() [4/4]

C3D_API castor3d::Animation::Animation ( Engine & handler,
AnimationType type,
castor::String const & name = castor::cuEmptyString )

Constructor.

Parameters
[in]handlerThe parent handler.
[in]typeThe type of the animation.
[in]nameThe name of the animation.

Member Function Documentation

◆ addKeyFrame()

C3D_API void castor3d::Animation::addKeyFrame ( AnimationKeyFrameUPtr keyFrame)

Adds a keyframe to the animation.

Parameters
[in]keyFrameThe keyframe.

◆ begin() [1/2]

AnimationKeyFrameArray::iterator castor3d::Animation::begin ( )
inline
Returns
The beginning of the key frames.

References m_keyframes.

◆ begin() [2/2]

AnimationKeyFrameArray::const_iterator castor3d::Animation::begin ( ) const
inline
Returns
The beginning of the key frames.

References m_keyframes.

◆ cloneInto()

C3D_API void castor3d::Animation::cloneInto ( Animation & output) const

Clones this object into the given one.

Parameters
[in,out]outputReceives this object's data.

◆ end() [1/2]

AnimationKeyFrameArray::iterator castor3d::Animation::end ( )
inline
Returns
The end of the key frames.

References m_keyframes.

◆ end() [2/2]

AnimationKeyFrameArray::const_iterator castor3d::Animation::end ( ) const
inline
Returns
The end of the key frames.

References m_keyframes.

◆ find()

C3D_API AnimationKeyFrameArray::iterator castor3d::Animation::find ( castor::Milliseconds const & time)

Finds a keyframe given a time index.

Parameters
[in]timeThe time index.

◆ findKeyFrame()

C3D_API void castor3d::Animation::findKeyFrame ( castor::Milliseconds const & time,
AnimationKeyFrameArray::iterator & prv,
AnimationKeyFrameArray::iterator & cur ) const

Finds a keyframe given a time index.

Parameters
[in]timeThe time index.
[in,out]prvThe previous keyframe, receives the new previous keyframe, if there is a change.
[in,out]curReceives the current keyframe, receives the new current keyframe, if there is a change.

◆ getAnimable()

Animable * castor3d::Animation::getAnimable ( ) const
inline

References m_animable.

◆ getLength()

castor::Milliseconds const & castor3d::Animation::getLength ( ) const
inline
Returns
The animation length.

References m_length.

◆ getType()

AnimationType castor3d::Animation::getType ( ) const
inline
Returns
The animation type.

References m_type.

◆ isEmpty()

bool castor3d::Animation::isEmpty ( ) const
inline
Returns
true if the key frames list is empty.

References m_keyframes.

◆ operator=() [1/2]

C3D_API Animation & castor3d::Animation::operator= ( Animation && rhs)
deletenoexcept

◆ operator=() [2/2]

C3D_API Animation & castor3d::Animation::operator= ( Animation const & rhs)
delete

◆ size()

size_t castor3d::Animation::size ( ) const
inline
Returns
The key frames count.

References m_keyframes.

◆ updateLength()

C3D_API void castor3d::Animation::updateLength ( )

Updates the animation length.

Friends And Related Symbol Documentation

◆ BinaryParser< Animation >

friend class BinaryParser< Animation >
friend

◆ BinaryWriter< Animation >

friend class BinaryWriter< Animation >
friend

Member Data Documentation

◆ m_animable

Animable* castor3d::Animation::m_animable {}
protected

Referenced by getAnimable().

◆ m_keyframes

AnimationKeyFrameArray castor3d::Animation::m_keyframes
protected

The key frames.

Referenced by begin(), begin(), end(), end(), isEmpty(), and size().

◆ m_length

castor::Milliseconds castor3d::Animation::m_length { 0 }
protected

The animation length.

Referenced by getLength().

◆ m_type

AnimationType castor3d::Animation::m_type { AnimationType::eCount }
protected

The animation type.

Referenced by getType().


The documentation for this class was generated from the following file: