Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Protected Types | Protected Attributes | Friends | List of all members
castor3d::SkeletonAnimation Class Reference

#include <SkeletonAnimation.hpp>

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

Public Member Functions

C3D_API SkeletonAnimation (Animable &animable, castor::String const &name=castor::cuEmptyString)
 Constructor.
 
C3D_API SkeletonAnimation (SkeletonAnimation &&rhs)=default
 Move constructor.
 
C3D_API SkeletonAnimationoperator= (SkeletonAnimation &&rhs)=delete
 Move assignment operator.
 
C3D_API SkeletonAnimation (SkeletonAnimation const &rhs)=delete
 Copy constructor.
 
C3D_API SkeletonAnimationoperator= (SkeletonAnimation const &rhs)=delete
 Copy assignment operator.
 
C3D_API SkeletonAnimationObjectRPtr addObject (SkeletonNode &node, SkeletonAnimationObject const *parent)
 Creates and adds a moving node.
 
C3D_API SkeletonAnimationObjectRPtr addObject (BoneNode &bone, SkeletonAnimationObject const *parent)
 Creates and adds a moving bone.
 
C3D_API SkeletonAnimationObjectRPtr addObject (SkeletonAnimationObjectUPtr object, SkeletonAnimationObject const *parent)
 adds an animated object.
 
C3D_API bool hasObject (SkeletonNodeType type, castor::String const &name) const
 Tells if the animation has the animated object.
 
C3D_API SkeletonAnimationObjectRPtr getObject (SkeletonNode const &node) const
 Retrieves an animated node.
 
C3D_API SkeletonAnimationObjectRPtr getObject (BoneNode const &bone) const
 Retrieves an animated bone.
 
C3D_API SkeletonAnimationObjectRPtr getObject (SkeletonNodeType type, castor::String const &name) const
 Retrieves an animated object.
 
auto const & getObjects () const
 
SkeletonAnimationObjectArray const & getRootObjects () const
 
- Public Member Functions inherited from castor3d::AnimationT< Engine >
 AnimationT (Engine &handler, AnimationType type, AnimableT< Engine > &animable, castor::String const &name=castor::cuEmptyString)
 Constructor.
 
 AnimationT (Engine &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< Engine > * getAnimable () const
 
C3D_API AnimationT (AnimationT &&rhs) noexcept=default
 
C3D_API AnimationT (AnimationT const &rhs)=delete
 
C3D_API AnimationToperator= (AnimationT &&rhs) noexcept=delete
 
C3D_API AnimationToperator= (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< Owner >
Owner * getOwner () const
 

Protected Types

using ObjectMap = castor::StringMap< SkeletonAnimationObjectUPtr >
 

Protected Attributes

SkeletonAnimationObjectArray m_rootObjects
 
ObjectMap m_toMove
 
- Protected Attributes inherited from castor3d::AnimationT< Engine >
AnimableT< Engine > * m_animable
 
AnimationType m_type
 
castor::Milliseconds m_length
 
AnimationKeyFrameArray m_keyframes
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Friends

class BinaryWriter< SkeletonAnimation >
 
class BinaryParser< SkeletonAnimation >
 
class SkeletonAnimationInstance
 

Additional Inherited Members

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

Member Typedef Documentation

◆ ObjectMap

using castor3d::SkeletonAnimation::ObjectMap = castor::StringMap< SkeletonAnimationObjectUPtr >
protected

Constructor & Destructor Documentation

◆ SkeletonAnimation() [1/3]

C3D_API castor3d::SkeletonAnimation::SkeletonAnimation ( Animable & animable,
castor::String const & name = castor::cuEmptyString )
explicit

Constructor.

Parameters
[in]animableThe parent animable object.
[in]nameThe name of the animation.

◆ SkeletonAnimation() [2/3]

C3D_API castor3d::SkeletonAnimation::SkeletonAnimation ( SkeletonAnimation && rhs)
default

Move constructor.

◆ SkeletonAnimation() [3/3]

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

Copy constructor.

Member Function Documentation

◆ addObject() [1/3]

C3D_API SkeletonAnimationObjectRPtr castor3d::SkeletonAnimation::addObject ( BoneNode & bone,
SkeletonAnimationObject const * parent )

Creates and adds a moving bone.

Parameters
[in]boneThe bone to add.
[in]parentThe moving object's parent.

◆ addObject() [2/3]

C3D_API SkeletonAnimationObjectRPtr castor3d::SkeletonAnimation::addObject ( SkeletonAnimationObjectUPtr object,
SkeletonAnimationObject const * parent )

adds an animated object.

Parameters
[in]objectThe animated object to add.
[in]parentThe moving object's parent.

◆ addObject() [3/3]

C3D_API SkeletonAnimationObjectRPtr castor3d::SkeletonAnimation::addObject ( SkeletonNode & node,
SkeletonAnimationObject const * parent )

Creates and adds a moving node.

Parameters
[in]nodeThe node to add.
[in]parentThe moving object's parent.

◆ getObject() [1/3]

C3D_API SkeletonAnimationObjectRPtr castor3d::SkeletonAnimation::getObject ( BoneNode const & bone) const

Retrieves an animated bone.

Parameters
[in]boneThe bone.

◆ getObject() [2/3]

C3D_API SkeletonAnimationObjectRPtr castor3d::SkeletonAnimation::getObject ( SkeletonNode const & node) const

Retrieves an animated node.

Parameters
[in]nodeThe node.

◆ getObject() [3/3]

C3D_API SkeletonAnimationObjectRPtr castor3d::SkeletonAnimation::getObject ( SkeletonNodeType type,
castor::String const & name ) const

Retrieves an animated object.

Parameters
[in]typeThe object type.
[in]nameThe object name.

◆ getObjects()

auto const & castor3d::SkeletonAnimation::getObjects ( ) const
inline
Returns
The moving objects.

References m_toMove.

◆ getRootObjects()

SkeletonAnimationObjectArray const & castor3d::SkeletonAnimation::getRootObjects ( ) const
inline
Returns
The root moving objects.

References m_rootObjects.

◆ hasObject()

C3D_API bool castor3d::SkeletonAnimation::hasObject ( SkeletonNodeType type,
castor::String const & name ) const

Tells if the animation has the animated object.

Parameters
[in]typeThe object type.
[in]nameThe object name.

◆ operator=() [1/2]

C3D_API SkeletonAnimation & castor3d::SkeletonAnimation::operator= ( SkeletonAnimation && rhs)
delete

Move assignment operator.

◆ operator=() [2/2]

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

Copy assignment operator.

Friends And Related Symbol Documentation

◆ BinaryParser< SkeletonAnimation >

friend class BinaryParser< SkeletonAnimation >
friend

◆ BinaryWriter< SkeletonAnimation >

friend class BinaryWriter< SkeletonAnimation >
friend

◆ SkeletonAnimationInstance

friend class SkeletonAnimationInstance
friend

Member Data Documentation

◆ m_rootObjects

SkeletonAnimationObjectArray castor3d::SkeletonAnimation::m_rootObjects
protected

The root moving objects.

Referenced by getRootObjects().

◆ m_toMove

ObjectMap castor3d::SkeletonAnimation::m_toMove
protected

The moving objects.

Referenced by getObjects().


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