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

#include <AnimatedSkeleton.hpp>

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

Public Member Functions

C3D_API AnimatedSkeleton (castor::String const &name, Skeleton &skeleton, Mesh &mesh, Geometry &geometry)
 Constructor. More...
 
C3D_API uint32_t fillShader (SkinningTransformsConfiguration *variable) const
 Fills a shader variable with this object's skeleton transforms. More...
 
C3D_API void fillBuffer (uint8_t *buffer) const
 Fills a buffer with this object's skeleton transforms. More...
 
C3D_API void update (castor::Milliseconds const &elapsed) override
 Updates the animations of the object, given the time since the last frame. More...
 
bool isPlayingAnimation () const override
 
SkeletongetSkeleton () const
 
MeshgetMesh () const
 
GeometrygetGeometry () const
 
uint32_t getId () const
 
void setId (uint32_t id)
 
C3D_API AnimatedSkeleton (AnimatedSkeleton &&rhs)=default
 
C3D_API AnimatedSkeletonoperator= (AnimatedSkeleton &&rhs)=delete
 
C3D_API AnimatedSkeleton (AnimatedSkeleton const &rhs)=delete
 
C3D_API AnimatedSkeletonoperator= (AnimatedSkeleton const &rhs)=delete
 
- Public Member Functions inherited from castor3d::AnimatedObject
C3D_API AnimatedObject (AnimationType kind, castor::String const &name)
 Constructor. More...
 
virtual C3D_API ~AnimatedObject ()=default
 Destructor. More...
 
C3D_API void addAnimation (castor::String const &name)
 adds the animation to the list More...
 
C3D_API void startAnimation (castor::String const &name)
 Starts the animation identified by the given name. More...
 
C3D_API void stopAnimation (castor::String const &name)
 Stops the animation identified by the given name. More...
 
C3D_API void pauseAnimation (castor::String const &name)
 Pauses the animation identified by the given name. More...
 
C3D_API void startAllAnimations ()
 Starts all animations. More...
 
C3D_API void stopAllAnimations ()
 Stops all animations. More...
 
C3D_API void pauseAllAnimations ()
 Pauses all animations. More...
 
C3D_API AnimationInstancegetAnimation (castor::String const &name)
 Retrieves an animation. More...
 
virtual C3D_API void update (castor::Milliseconds const &elapsed)=0
 Updates the animations of the object, given the time since the last frame. More...
 
virtual C3D_API bool isPlayingAnimation () const =0
 
C3D_API AnimatedObject (AnimatedObject &&rhs)=default
 
C3D_API AnimatedObjectoperator= (AnimatedObject &&rhs)=default
 
C3D_API AnimatedObject (AnimatedObject const &rhs)=delete
 
C3D_API AnimatedObjectoperator= (AnimatedObject const &rhs)=delete
 
bool hasAnimation (castor::String const &name)
 
AnimationInstancePtrStrMap const & getAnimations () const
 
AnimationType getKind () const
 

Protected Attributes

Skeletonm_skeleton
 
Meshm_mesh
 
Geometrym_geometry
 
SkeletonAnimationInstanceArray m_playingAnimations
 
uint32_t m_id {}
 
- Protected Attributes inherited from castor3d::AnimatedObject
AnimationInstancePtrStrMap m_animations
 

Constructor & Destructor Documentation

◆ AnimatedSkeleton() [1/3]

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

name Copy / Move.

◆ AnimatedSkeleton() [2/3]

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

◆ AnimatedSkeleton() [3/3]

C3D_API castor3d::AnimatedSkeleton::AnimatedSkeleton ( castor::String const &  name,
Skeleton skeleton,
Mesh mesh,
Geometry geometry 
)

Constructor.

Parameters
[in]nameThe object name.
[in]skeletonThe skeleton.
[in]meshThe mesh to which the skeleton is bound.
[in]geometryThe geometry instantiating the mesh.

Member Function Documentation

◆ fillBuffer()

C3D_API void castor3d::AnimatedSkeleton::fillBuffer ( uint8_t *  buffer) const

Fills a buffer with this object's skeleton transforms.

Parameters
[out]bufferReceives the transforms.

◆ fillShader()

C3D_API uint32_t castor3d::AnimatedSkeleton::fillShader ( SkinningTransformsConfiguration variable) const

Fills a shader variable with this object's skeleton transforms.

Parameters
[out]variableReceives the transforms.

◆ getGeometry()

Geometry & castor3d::AnimatedSkeleton::getGeometry ( ) const
inline

References m_geometry.

◆ getId()

uint32_t castor3d::AnimatedSkeleton::getId ( ) const
inline

References m_id.

◆ getMesh()

Mesh & castor3d::AnimatedSkeleton::getMesh ( ) const
inline

References m_mesh.

◆ getSkeleton()

Skeleton & castor3d::AnimatedSkeleton::getSkeleton ( ) const
inline

References m_skeleton.

◆ isPlayingAnimation()

bool castor3d::AnimatedSkeleton::isPlayingAnimation ( ) const
inlineoverridevirtual
Returns
true if the object is playing an animation.

Implements castor3d::AnimatedObject.

References m_playingAnimations.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setId()

void castor3d::AnimatedSkeleton::setId ( uint32_t  id)
inline

References m_id.

◆ update()

C3D_API void castor3d::AnimatedSkeleton::update ( castor::Milliseconds const &  elapsed)
overridevirtual

Updates the animations of the object, given the time since the last frame.

Parameters
[in]elapsedTime elapsed since the last frame

Implements castor3d::AnimatedObject.

Member Data Documentation

◆ m_geometry

Geometry& castor3d::AnimatedSkeleton::m_geometry
protected

Referenced by getGeometry().

◆ m_id

uint32_t castor3d::AnimatedSkeleton::m_id {}
protected

Referenced by getId(), and setId().

◆ m_mesh

Mesh& castor3d::AnimatedSkeleton::m_mesh
protected

Referenced by getMesh().

◆ m_playingAnimations

SkeletonAnimationInstanceArray castor3d::AnimatedSkeleton::m_playingAnimations
protected

Referenced by isPlayingAnimation().

◆ m_skeleton

Skeleton& castor3d::AnimatedSkeleton::m_skeleton
protected

Referenced by getSkeleton().


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