Castor3D 0.16.0
Multiplatform 3D engine
|
#include <AnimatedObject.hpp>
Public Types | |
using | AnimationInstancesMap = castor::StringMap< AnimationInstanceUPtr > |
Public Member Functions | |
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 AnimationInstance & | getAnimation (castor::String const &name) |
Retrieves an animation. | |
virtual C3D_API void | update (castor::Milliseconds const &elapsed)=0 |
Updates the animations of the object, given the time since the last frame. | |
virtual C3D_API bool | isPlayingAnimation () const =0 |
C3D_API | AnimatedObject (AnimatedObject &&rhs) noexcept=default |
C3D_API AnimatedObject & | operator= (AnimatedObject &&rhs) noexcept=default |
C3D_API | AnimatedObject (AnimatedObject const &rhs)=delete |
C3D_API AnimatedObject & | operator= (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 | |
AnimationInstancesMap | m_animations |
Protected Attributes inherited from castor::NamedBaseT< T > | |
T | m_name |
using castor3d::AnimatedObject::AnimationInstancesMap = castor::StringMap< AnimationInstanceUPtr > |
|
defaultnoexcept |
name Copy / Move.
|
delete |
|
explicit |
Constructor.
[in] | kind | The animation type. |
[in] | name | The object name. |
|
virtualdefaultnoexcept |
Destructor.
C3D_API void castor3d::AnimatedObject::addAnimation | ( | castor::String const & | name | ) |
adds the animation to the list
[in] | name | The animation to add |
C3D_API AnimationInstance & castor3d::AnimatedObject::getAnimation | ( | castor::String const & | name | ) |
Retrieves an animation.
[in] | name | The animation name |
|
inline |
References m_animations.
|
inline |
|
inline |
name Getters.
References m_animations.
|
pure virtual |
true
if the object is playing an animation. Implemented in castor3d::AnimatedMesh, castor3d::AnimatedSceneNode, castor3d::AnimatedSkeleton, and castor3d::AnimatedTexture.
|
defaultnoexcept |
|
delete |
C3D_API void castor3d::AnimatedObject::pauseAllAnimations | ( | ) |
Pauses all animations.
C3D_API void castor3d::AnimatedObject::pauseAnimation | ( | castor::String const & | name | ) |
Pauses the animation identified by the given name.
[in] | name | The name of the animation |
C3D_API void castor3d::AnimatedObject::startAllAnimations | ( | ) |
Starts all animations.
C3D_API void castor3d::AnimatedObject::startAnimation | ( | castor::String const & | name | ) |
Starts the animation identified by the given name.
[in] | name | The name of the animation |
C3D_API void castor3d::AnimatedObject::stopAllAnimations | ( | ) |
Stops all animations.
C3D_API void castor3d::AnimatedObject::stopAnimation | ( | castor::String const & | name | ) |
Stops the animation identified by the given name.
[in] | name | The name of the animation |
|
pure virtual |
Updates the animations of the object, given the time since the last frame.
[in] | elapsed | Time elapsed since the last frame |
Implemented in castor3d::AnimatedMesh, castor3d::AnimatedSceneNode, castor3d::AnimatedSkeleton, and castor3d::AnimatedTexture.
|
protected |
All animations.
Referenced by getAnimations(), and hasAnimation().