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

#include <AnimatedMesh.hpp>

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

Public Member Functions

C3D_API AnimatedMesh (AnimatedMesh &&rhs) noexcept=default
 
C3D_API AnimatedMeshoperator= (AnimatedMesh &&rhs) noexcept=delete
 
C3D_API AnimatedMesh (AnimatedMesh const &rhs)=delete
 
C3D_API AnimatedMeshoperator= (AnimatedMesh const &rhs)=delete
 
C3D_API ~AnimatedMesh () noexcept override=default
 
C3D_API AnimatedMesh (castor::String const &name, Mesh &mesh, Geometry &geometry)
 Constructor.
 
C3D_API uint32_t fillBuffer (Submesh const &submesh, MorphingWeightsConfiguration *buffer) const
 Fills a buffer with this object's morph targets weights transforms.
 
C3D_API void update (castor::Milliseconds const &elapsed) override
 Updates the animations of the object, given the time since the last frame.
 
C3D_API uint32_t getId (Submesh const &submesh) const
 
C3D_API void setId (Submesh const &submesh, uint32_t id)
 
bool isPlayingAnimation () const override
 
MeshgetMesh () const
 
GeometrygetGeometry () const
 
MeshAnimationInstancegetPlayingAnimation () const
 
- Public Member Functions inherited from castor3d::AnimatedObject
C3D_API AnimatedObject (AnimationType kind, castor::String const &name)
 Constructor.
 
virtual C3D_API ~AnimatedObject () noexcept=default
 Destructor.
 
C3D_API void addAnimation (castor::String const &name)
 adds the animation to the list
 
C3D_API void startAnimation (castor::String const &name)
 Starts the animation identified by the given name.
 
C3D_API void stopAnimation (castor::String const &name)
 Stops the animation identified by the given name.
 
C3D_API void pauseAnimation (castor::String const &name)
 Pauses the animation identified by the given name.
 
C3D_API void startAllAnimations ()
 Starts all animations.
 
C3D_API void stopAllAnimations ()
 Stops all animations.
 
C3D_API void pauseAllAnimations ()
 Pauses all animations.
 
C3D_API AnimationInstancegetAnimation (castor::String const &name)
 Retrieves an animation.
 
C3D_API AnimatedObject (AnimatedObject &&rhs) noexcept=default
 
C3D_API AnimatedObjectoperator= (AnimatedObject &&rhs) noexcept=default
 
C3D_API AnimatedObject (AnimatedObject const &rhs)=delete
 
C3D_API AnimatedObjectoperator= (AnimatedObject const &rhs)=delete
 
bool hasAnimation (castor::String const &name)
 
AnimationInstancesMap const & getAnimations () const
 
AnimationType getKind () const
 
- 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
 

Protected Attributes

Meshm_mesh
 
Geometrym_geometry
 
MeshAnimationInstanceRPtr m_playingAnimation { nullptr }
 
castor::Vector< uint32_t > m_ids
 
bool m_reinit { false }
 
- Protected Attributes inherited from castor3d::AnimatedObject
AnimationInstancesMap m_animations
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Additional Inherited Members

- Public Types inherited from castor3d::AnimatedObject
using AnimationInstancesMap = castor::StringMap< AnimationInstanceUPtr >
 

Constructor & Destructor Documentation

◆ AnimatedMesh() [1/3]

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

◆ AnimatedMesh() [2/3]

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

◆ ~AnimatedMesh()

C3D_API castor3d::AnimatedMesh::~AnimatedMesh ( )
overridedefaultnoexcept

◆ AnimatedMesh() [3/3]

C3D_API castor3d::AnimatedMesh::AnimatedMesh ( castor::String const & name,
Mesh & mesh,
Geometry & geometry )

Constructor.

Parameters
[in]nameThe object name.
[in]meshThe mesh.
[in]geometryThe geometry instantiating the mesh.

Member Function Documentation

◆ fillBuffer()

C3D_API uint32_t castor3d::AnimatedMesh::fillBuffer ( Submesh const & submesh,
MorphingWeightsConfiguration * buffer ) const

Fills a buffer with this object's morph targets weights transforms.

Parameters
[out]submeshThe submesh from which the morph targets are retrieved.
[out]bufferReceives the transforms.

◆ getGeometry()

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

References m_geometry.

◆ getId()

C3D_API uint32_t castor3d::AnimatedMesh::getId ( Submesh const & submesh) const

◆ getMesh()

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

References m_mesh.

◆ getPlayingAnimation()

MeshAnimationInstance & castor3d::AnimatedMesh::getPlayingAnimation ( ) const
inline

References m_playingAnimation.

◆ isPlayingAnimation()

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

Implements castor3d::AnimatedObject.

References m_playingAnimation.

◆ operator=() [1/2]

C3D_API AnimatedMesh & castor3d::AnimatedMesh::operator= ( AnimatedMesh && rhs)
deletenoexcept

◆ operator=() [2/2]

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

◆ setId()

C3D_API void castor3d::AnimatedMesh::setId ( Submesh const & submesh,
uint32_t id )

◆ update()

C3D_API void castor3d::AnimatedMesh::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::AnimatedMesh::m_geometry
protected

Referenced by getGeometry().

◆ m_ids

castor::Vector< uint32_t > castor3d::AnimatedMesh::m_ids
protected

◆ m_mesh

Mesh& castor3d::AnimatedMesh::m_mesh
protected

Referenced by getMesh().

◆ m_playingAnimation

MeshAnimationInstanceRPtr castor3d::AnimatedMesh::m_playingAnimation { nullptr }
protected

◆ m_reinit

bool castor3d::AnimatedMesh::m_reinit { false }
mutableprotected

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