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

#include <MeshAnimationInstance.hpp>

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

Public Member Functions

C3D_API MeshAnimationInstance (MeshAnimationInstance &&rhs)=default
 
C3D_API MeshAnimationInstanceoperator= (MeshAnimationInstance &&rhs)=delete
 
C3D_API MeshAnimationInstance (MeshAnimationInstance const &rhs)=delete
 
C3D_API MeshAnimationInstanceoperator= (MeshAnimationInstance const &rhs)=delete
 
C3D_API ~MeshAnimationInstance () noexcept override=default
 
C3D_API MeshAnimationInstance (AnimatedMesh &object, MeshAnimation &animation)
 Constructor.
 
C3D_API MeshAnimationInstanceSubmesh const * getAnimationSubmesh (uint32_t index) const
 
C3D_API void clear ()
 Moves the objects back to initial state.
 
MeshAnimation const & getMeshAnimation () const
 
AnimatedMeshgetAnimatedMesh ()
 
- 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

AnimatedMeshm_animatedMesh
 
MeshAnimation const & m_meshAnimation
 
MeshAnimationInstanceSubmeshMap m_submeshes
 
AnimationKeyFrameArray::iterator m_prev
 
AnimationKeyFrameArray::iterator m_curr
 
bool m_stopping { false }
 
- 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 }
 

Friends

class BinaryWriter< MeshAnimation >
 
class BinaryParser< MeshAnimation >
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ MeshAnimationInstance() [1/3]

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

◆ MeshAnimationInstance() [2/3]

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

◆ ~MeshAnimationInstance()

C3D_API castor3d::MeshAnimationInstance::~MeshAnimationInstance ( )
overridedefaultnoexcept

◆ MeshAnimationInstance() [3/3]

C3D_API castor3d::MeshAnimationInstance::MeshAnimationInstance ( AnimatedMesh & object,
MeshAnimation & animation )

Constructor.

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

Member Function Documentation

◆ clear()

C3D_API void castor3d::MeshAnimationInstance::clear ( )

Moves the objects back to initial state.

◆ getAnimatedMesh()

AnimatedMesh & castor3d::MeshAnimationInstance::getAnimatedMesh ( )
inline
Returns
The animated mesh.

References m_animatedMesh.

◆ getAnimationSubmesh()

C3D_API MeshAnimationInstanceSubmesh const * castor3d::MeshAnimationInstance::getAnimationSubmesh ( uint32_t index) const
Returns
The animation submesh at given ID, nullptr if not found.

◆ getMeshAnimation()

MeshAnimation const & castor3d::MeshAnimationInstance::getMeshAnimation ( ) const
inline
Returns
The animation.

References m_meshAnimation.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Friends And Related Symbol Documentation

◆ BinaryParser< MeshAnimation >

friend class BinaryParser< MeshAnimation >
friend

◆ BinaryWriter< MeshAnimation >

friend class BinaryWriter< MeshAnimation >
friend

Member Data Documentation

◆ m_animatedMesh

AnimatedMesh& castor3d::MeshAnimationInstance::m_animatedMesh
protected

Referenced by getAnimatedMesh().

◆ m_curr

AnimationKeyFrameArray::iterator castor3d::MeshAnimationInstance::m_curr
protected

◆ m_meshAnimation

MeshAnimation const& castor3d::MeshAnimationInstance::m_meshAnimation
protected

Referenced by getMeshAnimation().

◆ m_prev

AnimationKeyFrameArray::iterator castor3d::MeshAnimationInstance::m_prev
protected

◆ m_stopping

bool castor3d::MeshAnimationInstance::m_stopping { false }
protected

◆ m_submeshes

MeshAnimationInstanceSubmeshMap castor3d::MeshAnimationInstance::m_submeshes
protected

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