Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Attributes | List of all members
castor3d::AnimatedObject Class Referenceabstract

#include <AnimatedObject.hpp>

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

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 AnimationInstancegetAnimation (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 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

AnimationInstancesMap m_animations
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Member Typedef Documentation

◆ AnimationInstancesMap

Constructor & Destructor Documentation

◆ AnimatedObject() [1/3]

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

name Copy / Move.

◆ AnimatedObject() [2/3]

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

◆ AnimatedObject() [3/3]

C3D_API castor3d::AnimatedObject::AnimatedObject ( AnimationType kind,
castor::String const & name )
explicit

Constructor.

Parameters
[in]kindThe animation type.
[in]nameThe object name.

◆ ~AnimatedObject()

virtual C3D_API castor3d::AnimatedObject::~AnimatedObject ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ addAnimation()

C3D_API void castor3d::AnimatedObject::addAnimation ( castor::String const & name)

adds the animation to the list

Parameters
[in]nameThe animation to add

◆ getAnimation()

C3D_API AnimationInstance & castor3d::AnimatedObject::getAnimation ( castor::String const & name)

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

◆ getAnimations()

AnimationInstancesMap const & castor3d::AnimatedObject::getAnimations ( ) const
inline

References m_animations.

◆ getKind()

AnimationType castor3d::AnimatedObject::getKind ( ) const
inline

◆ hasAnimation()

bool castor3d::AnimatedObject::hasAnimation ( castor::String const & name)
inline

name Getters.

References m_animations.

◆ isPlayingAnimation()

virtual C3D_API bool castor3d::AnimatedObject::isPlayingAnimation ( ) const
pure virtual
Returns
true if the object is playing an animation.

Implemented in castor3d::AnimatedMesh, castor3d::AnimatedSceneNode, castor3d::AnimatedSkeleton, and castor3d::AnimatedTexture.

◆ operator=() [1/2]

C3D_API AnimatedObject & castor3d::AnimatedObject::operator= ( AnimatedObject && rhs)
defaultnoexcept

◆ operator=() [2/2]

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

◆ pauseAllAnimations()

C3D_API void castor3d::AnimatedObject::pauseAllAnimations ( )

Pauses all animations.

◆ pauseAnimation()

C3D_API void castor3d::AnimatedObject::pauseAnimation ( castor::String const & name)

Pauses the animation identified by the given name.

Parameters
[in]nameThe name of the animation

◆ startAllAnimations()

C3D_API void castor3d::AnimatedObject::startAllAnimations ( )

Starts all animations.

◆ startAnimation()

C3D_API void castor3d::AnimatedObject::startAnimation ( castor::String const & name)

Starts the animation identified by the given name.

Parameters
[in]nameThe name of the animation

◆ stopAllAnimations()

C3D_API void castor3d::AnimatedObject::stopAllAnimations ( )

Stops all animations.

◆ stopAnimation()

C3D_API void castor3d::AnimatedObject::stopAnimation ( castor::String const & name)

Stops the animation identified by the given name.

Parameters
[in]nameThe name of the animation

◆ update()

virtual C3D_API void castor3d::AnimatedObject::update ( castor::Milliseconds const & elapsed)
pure virtual

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

Parameters
[in]elapsedTime elapsed since the last frame

Implemented in castor3d::AnimatedMesh, castor3d::AnimatedSceneNode, castor3d::AnimatedSkeleton, and castor3d::AnimatedTexture.

Member Data Documentation

◆ m_animations

AnimationInstancesMap castor3d::AnimatedObject::m_animations
protected

All animations.

Referenced by getAnimations(), and hasAnimation().


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