Castor3D 0.17.0
Multiplatform 3D engine
Public Member Functions | 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::Animation
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
 

Friends

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

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner) noexcept
 Constructor.
 
- Protected Attributes inherited from castor3d::Animation
Animablem_animable {}
 
AnimationType m_type { AnimationType::eCount }
 
castor::Milliseconds m_length { 0 }
 
AnimationKeyFrameArray m_keyframes
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

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.

◆ getRootObjects()

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

◆ 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

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