Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Protected Attributes | List of all members
castor3d::SkeletonAnimationInstance Class Reference

#include <SkeletonAnimationInstance.hpp>

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

Public Member Functions

C3D_API SkeletonAnimationInstance (AnimatedSkeleton &object, SkeletonAnimation &animation)
 Constructor. More...
 
C3D_API SkeletonAnimationInstanceObjectSPtr getObject (Bone const &bone) const
 Retrieves an animated bone. More...
 
C3D_API SkeletonAnimationInstanceObjectSPtr getObject (castor::String const &name) const
 Retrieves an animated node. More...
 
C3D_API SkeletonAnimationInstanceObjectSPtr getObject (SkeletonAnimationObjectType type, castor::String const &name) const
 Retrieves an animated object. More...
 
auto getObjectsCount () const
 
auto begin ()
 
auto begin () const
 
auto end ()
 
auto end () const
 
C3D_API SkeletonAnimationInstance (SkeletonAnimationInstance &&rhs)=default
 
C3D_API SkeletonAnimationInstanceoperator= (SkeletonAnimationInstance &&rhs)=delete
 
C3D_API SkeletonAnimationInstance (SkeletonAnimationInstance const &rhs)=delete
 
C3D_API SkeletonAnimationInstanceoperator= (SkeletonAnimationInstance const &rhs)=delete
 
- Public Member Functions inherited from castor3d::AnimationInstance
C3D_API AnimationInstance (AnimatedObject &object, Animation &animation)
 Constructor. More...
 
virtual C3D_API ~AnimationInstance ()=default
 Destructor. More...
 
C3D_API void update (castor::Milliseconds const &elapsed)
 Updates the animation, updates the key frame at the good time index. More...
 
C3D_API void play ()
 Plays the animation. More...
 
C3D_API void pause ()
 Pauses the animation. More...
 
C3D_API void stop ()
 Stops the animation. More...
 
AnimationState getState () const
 
float getScale () const
 
void setScale (float value)
 Sets the animation time scale. More...
 
castor::Milliseconds getStartingPoint () const
 
void setStartingPoint (castor::Milliseconds value)
 Sets the animation stopping point. More...
 
castor::Milliseconds getStoppingPoint () const
 
void setStoppingPoint (castor::Milliseconds value)
 Sets the animation stopping point. More...
 
bool isLooped () const
 
void setLooped (bool value)
 Sets the animation loop status. More...
 
Animation const & getAnimation () const
 

Protected Attributes

SkeletonAnimationInstanceObjectPtrArray m_toMove
 
SkeletonAnimationInstanceKeyFrameArray m_keyFrames
 
SkeletonAnimationInstanceKeyFrameArray::iterator m_curr
 
- Protected Attributes inherited from castor3d::AnimationInstance
Animation const & m_animation
 
float m_scale { 1.0f }
 
bool m_looped { false }
 
castor::Milliseconds m_startingPoint { 0 }
 
castor::Milliseconds m_stoppingPoint { 0 }
 
castor::Milliseconds m_currentTime { 0 }
 
AnimationState m_state { AnimationState::eStopped }
 

Constructor & Destructor Documentation

◆ SkeletonAnimationInstance() [1/3]

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

name Copy / Move.

◆ SkeletonAnimationInstance() [2/3]

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

◆ SkeletonAnimationInstance() [3/3]

C3D_API castor3d::SkeletonAnimationInstance::SkeletonAnimationInstance ( AnimatedSkeleton object,
SkeletonAnimation animation 
)

Constructor.

Parameters
[in]objectThe parent AnimatedSkeleton.
[in]animationThe animation.

Member Function Documentation

◆ begin() [1/2]

auto castor3d::SkeletonAnimationInstance::begin ( )
inline
Returns
The root objects beginning iterator.

References m_toMove.

◆ begin() [2/2]

auto castor3d::SkeletonAnimationInstance::begin ( ) const
inline
Returns
The root objects beginning iterator.

References m_toMove.

◆ end() [1/2]

auto castor3d::SkeletonAnimationInstance::end ( )
inline
Returns
The root objects end iterator.

References m_toMove.

◆ end() [2/2]

auto castor3d::SkeletonAnimationInstance::end ( ) const
inline
Returns
The root objects end iterator.

References m_toMove.

◆ getObject() [1/3]

C3D_API SkeletonAnimationInstanceObjectSPtr castor3d::SkeletonAnimationInstance::getObject ( Bone const &  bone) const

Retrieves an animated bone.

Parameters
[in]boneThe bone.

◆ getObject() [2/3]

C3D_API SkeletonAnimationInstanceObjectSPtr castor3d::SkeletonAnimationInstance::getObject ( castor::String const &  name) const

Retrieves an animated node.

Parameters
[in]nameThe node name.

◆ getObject() [3/3]

C3D_API SkeletonAnimationInstanceObjectSPtr castor3d::SkeletonAnimationInstance::getObject ( SkeletonAnimationObjectType  type,
castor::String const &  name 
) const

Retrieves an animated object.

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

◆ getObjectsCount()

auto castor3d::SkeletonAnimationInstance::getObjectsCount ( ) const
inline
Returns
The objects count.

References m_toMove.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ m_curr

SkeletonAnimationInstanceKeyFrameArray::iterator castor3d::SkeletonAnimationInstance::m_curr
protected

Iterator to the current keyframe (when playing the animation).

◆ m_keyFrames

SkeletonAnimationInstanceKeyFrameArray castor3d::SkeletonAnimationInstance::m_keyFrames
protected

The instance keyframes.

◆ m_toMove

SkeletonAnimationInstanceObjectPtrArray castor3d::SkeletonAnimationInstance::m_toMove
protected

The moving objects.

Referenced by begin(), end(), and getObjectsCount().


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