Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | 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. More...
 
C3D_API SkeletonAnimation (SkeletonAnimation &&rhs)=default
 Move constructor. More...
 
C3D_API SkeletonAnimationoperator= (SkeletonAnimation &&rhs)=delete
 Move assignment operator. More...
 
C3D_API SkeletonAnimation (SkeletonAnimation const &rhs)=delete
 Copy constructor. More...
 
C3D_API SkeletonAnimationoperator= (SkeletonAnimation const &rhs)=delete
 Copy assignment operator. More...
 
C3D_API SkeletonAnimationObjectSPtr addObject (castor::String const &name, SkeletonAnimationObjectSPtr parent)
 Creates and adds a moving node. More...
 
C3D_API SkeletonAnimationObjectSPtr addObject (BoneSPtr bone, SkeletonAnimationObjectSPtr parent)
 Creates and adds a moving bone. More...
 
C3D_API SkeletonAnimationObjectSPtr addObject (SkeletonAnimationObjectSPtr object, SkeletonAnimationObjectSPtr parent)
 adds an animated object. More...
 
C3D_API bool hasObject (SkeletonAnimationObjectType type, castor::String const &name) const
 Tells if the animation has the animated object. More...
 
C3D_API SkeletonAnimationObjectSPtr getObject (Bone const &bone) const
 Retrieves an animated bone. More...
 
C3D_API SkeletonAnimationObjectSPtr getObject (castor::String const &name) const
 Retrieves an animated object. More...
 
C3D_API SkeletonAnimationObjectSPtr getObject (SkeletonAnimationObjectType type, castor::String const &name) const
 Retrieves an animated object. More...
 
SkeletonAnimationObjectPtrStrMap const & getObjects () const
 
SkeletonAnimationObjectPtrArray 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. More...
 
 AnimationT (Engine &handler, AnimationType type, castor::String const &name=castor::cuEmptyString)
 Constructor. More...
 
void addKeyFrame (AnimationKeyFrameUPtr keyFrame)
 Adds a keyframe to the animation. More...
 
AnimationKeyFrameArray::iterator find (castor::Milliseconds const &time)
 Finds a keyframe given a time index. More...
 
void findKeyFrame (castor::Milliseconds const &time, AnimationKeyFrameArray::iterator &prv, AnimationKeyFrameArray::iterator &cur) const
 Finds a keyframe given a time index. More...
 
void updateLength ()
 Updates the animation length. More...
 
bool isEmpty () 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)=default
 
C3D_API AnimationT (AnimationT const &rhs)=delete
 
C3D_API AnimationToperator= (AnimationT &&rhs)=delete
 
C3D_API AnimationToperator= (AnimationT const &rhs)=delete
 
virtual C3D_API ~AnimationT ()=default
 

Protected Attributes

SkeletonAnimationObjectPtrArray m_arrayMoving
 
SkeletonAnimationObjectPtrStrMap m_toMove
 
- Protected Attributes inherited from castor3d::AnimationT< Engine >
AnimableT< Engine > * m_animable
 
AnimationType m_type
 
castor::Milliseconds m_length
 
AnimationKeyFrameArray m_keyframes
 

Friends

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

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 SkeletonAnimationObjectSPtr castor3d::SkeletonAnimation::addObject ( BoneSPtr  bone,
SkeletonAnimationObjectSPtr  parent 
)

Creates and adds a moving bone.

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

◆ addObject() [2/3]

C3D_API SkeletonAnimationObjectSPtr castor3d::SkeletonAnimation::addObject ( castor::String const &  name,
SkeletonAnimationObjectSPtr  parent 
)

Creates and adds a moving node.

Parameters
[in]nameThe node name.
[in]parentThe moving object's parent.

◆ addObject() [3/3]

C3D_API SkeletonAnimationObjectSPtr castor3d::SkeletonAnimation::addObject ( SkeletonAnimationObjectSPtr  object,
SkeletonAnimationObjectSPtr  parent 
)

adds an animated object.

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

◆ getObject() [1/3]

C3D_API SkeletonAnimationObjectSPtr castor3d::SkeletonAnimation::getObject ( Bone const &  bone) const

Retrieves an animated bone.

Parameters
[in]boneThe bone.

◆ getObject() [2/3]

C3D_API SkeletonAnimationObjectSPtr castor3d::SkeletonAnimation::getObject ( castor::String const &  name) const

Retrieves an animated object.

Parameters
[in]nameThe object name.

◆ getObject() [3/3]

C3D_API SkeletonAnimationObjectSPtr castor3d::SkeletonAnimation::getObject ( SkeletonAnimationObjectType  type,
castor::String const &  name 
) const

Retrieves an animated object.

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

◆ getObjects()

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

References m_toMove.

◆ getRootObjects()

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

References m_arrayMoving.

◆ hasObject()

C3D_API bool castor3d::SkeletonAnimation::hasObject ( SkeletonAnimationObjectType  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 Function Documentation

◆ BinaryParser< SkeletonAnimation >

friend class BinaryParser< SkeletonAnimation >
friend

◆ BinaryWriter< SkeletonAnimation >

friend class BinaryWriter< SkeletonAnimation >
friend

◆ SkeletonAnimationInstance

friend class SkeletonAnimationInstance
friend

Member Data Documentation

◆ m_arrayMoving

SkeletonAnimationObjectPtrArray castor3d::SkeletonAnimation::m_arrayMoving
protected

The root moving objects.

Referenced by getRootObjects().

◆ m_toMove

SkeletonAnimationObjectPtrStrMap castor3d::SkeletonAnimation::m_toMove
protected

The moving objects.

Referenced by getObjects().


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