Castor3D 0.16.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 (SkeletonAnimationInstance &&rhs) noexcept=default
 
C3D_API SkeletonAnimationInstanceoperator= (SkeletonAnimationInstance &&rhs) noexcept=delete
 
C3D_API SkeletonAnimationInstance (SkeletonAnimationInstance const &rhs)=delete
 
C3D_API SkeletonAnimationInstanceoperator= (SkeletonAnimationInstance const &rhs)=delete
 
C3D_API ~SkeletonAnimationInstance () noexcept override=default
 
C3D_API SkeletonAnimationInstance (AnimatedSkeleton &object, SkeletonAnimation &animation)
 Constructor.
 
C3D_API SkeletonAnimationInstanceObjectRPtr getObject (BoneNode const &bone) const
 Retrieves an animated bone.
 
C3D_API SkeletonAnimationInstanceObjectRPtr getObject (SkeletonNode const &node) const
 Retrieves an animated node.
 
C3D_API SkeletonAnimationInstanceObjectRPtr getObject (SkeletonNodeType type, castor::String const &name) const
 Retrieves an animated object.
 
auto getObjectsCount () const
 
auto begin ()
 
auto begin () const
 
auto end ()
 
auto end () const
 
- Public Member Functions inherited from castor3d::AnimationInstance
C3D_API AnimationInstance (AnimatedObject &object, Animation const &animation, bool looped=false)
 Constructor.
 
virtual C3D_API ~AnimationInstance () noexcept=default
 Destructor.
 
C3D_API void update (castor::Milliseconds const &elapsed)
 Updates the animation, updates the key frame at the good time index.
 
C3D_API void play ()
 Plays the animation.
 
C3D_API void pause ()
 Pauses the animation.
 
C3D_API void stop ()
 Stops the animation.
 
AnimationState getState () const
 
float getScale () const
 
void setScale (float value)
 Sets the animation time scale.
 
castor::Milliseconds getStartingPoint () const
 
void setStartingPoint (castor::Milliseconds value)
 Sets the animation stopping point.
 
castor::Milliseconds getStoppingPoint () const
 
void setStoppingPoint (castor::Milliseconds value)
 Sets the animation stopping point.
 
bool isLooped () const
 
void setLooped (bool value)
 Sets the animation loop status.
 
InterpolatorType getInterpolation () const
 
void setInterpolation (InterpolatorType value)
 Sets the animation interpolation mode.
 
Animation const & getAnimation () const
 
C3D_API AnimationInstanceoperator= (AnimationInstance &&rhs) noexcept=delete
 
C3D_API AnimationInstance (AnimationInstance const &rhs)=delete
 
C3D_API AnimationInstanceoperator= (AnimationInstance const &rhs)=delete
 
C3D_API AnimationInstance (AnimationInstance &&rhs) noexcept
 
- Public Member Functions inherited from castor::OwnedBy< AnimatedObject >
AnimatedObject * getOwner () 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 }
 
std::atomic_bool m_looped
 
castor::Milliseconds m_startingPoint { 0 }
 
castor::Milliseconds m_stoppingPoint { 0 }
 
castor::Milliseconds m_currentTime { 0 }
 
AnimationState m_state { AnimationState::eStopped }
 
InterpolatorType m_interpolation { InterpolatorType::eLinear }
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ SkeletonAnimationInstance() [1/3]

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

◆ SkeletonAnimationInstance() [2/3]

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

◆ ~SkeletonAnimationInstance()

C3D_API castor3d::SkeletonAnimationInstance::~SkeletonAnimationInstance ( )
overridedefaultnoexcept

◆ 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 SkeletonAnimationInstanceObjectRPtr castor3d::SkeletonAnimationInstance::getObject ( BoneNode const & bone) const

Retrieves an animated bone.

Parameters
[in]boneThe bone.

◆ getObject() [2/3]

C3D_API SkeletonAnimationInstanceObjectRPtr castor3d::SkeletonAnimationInstance::getObject ( SkeletonNode const & node) const

Retrieves an animated node.

Parameters
[in]nodeThe node.

◆ getObject() [3/3]

C3D_API SkeletonAnimationInstanceObjectRPtr castor3d::SkeletonAnimationInstance::getObject ( SkeletonNodeType 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)
deletenoexcept

◆ 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(), begin(), end(), end(), and getObjectsCount().


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