Castor3D 0.17.0
Multiplatform 3D engine
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
castor3d::Animable Class Reference

#include <Animable.hpp>

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

Public Member Functions

virtual C3D_API ~Animable () noexcept=default
 
C3D_API void cleanupAnimations ()
 Empties the animations map.
 
virtual C3D_API bool hasAnimation () const noexcept
 
C3D_API bool hasAnimation (castor::String const &name) const
 
C3D_API Animation const & getAnimation (castor::String const &name) const
 Retrieves an animation.
 
C3D_API AnimationgetAnimation (castor::String const &name)
 Retrieves an animation.
 
C3D_API void addAnimation (AnimationPtr animation)
 Adds an animation.
 
AnimationsMap const & getAnimations () const
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const noexcept
 
void setOwner (Engine &owner) noexcept
 

Protected Types

using AnimationPtr = castor::UniquePtr< Animation >
 
using AnimationsMap = castor::StringMap< AnimationPtr >
 

Protected Member Functions

C3D_API void doRemoveAnimation (castor::String const &name)
 Removes an animation.
 
template<typename AnimationType >
AnimationTypedoGetAnimation (castor::String const &name)
 Retrieves an animation.
 
template<typename AnimationType >
AnimationType const & doGetAnimation (castor::String const &name) const
 Retrieves an animation.
 
Construction / Destruction.
C3D_API Animable (Engine &owner)
 
C3D_API Animable (Animable &&rhs) noexcept=default
 
C3D_API Animableoperator= (Animable &&rhs) noexcept=delete
 
C3D_API Animable (Animable const &rhs)=delete
 
C3D_API Animableoperator= (Animable const &rhs)=delete
 
- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner) noexcept
 Constructor.
 

Protected Attributes

AnimationsMap m_animations
 

Member Typedef Documentation

◆ AnimationPtr

◆ AnimationsMap

Constructor & Destructor Documentation

◆ Animable() [1/3]

C3D_API castor3d::Animable::Animable ( Engine & owner)
explicitprotected

◆ Animable() [2/3]

C3D_API castor3d::Animable::Animable ( Animable && rhs)
protecteddefaultnoexcept

◆ Animable() [3/3]

C3D_API castor3d::Animable::Animable ( Animable const & rhs)
protecteddelete

◆ ~Animable()

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

Member Function Documentation

◆ addAnimation()

C3D_API void castor3d::Animable::addAnimation ( AnimationPtr animation)

Adds an animation.

Parameters
[in]animationThe animation.

◆ cleanupAnimations()

C3D_API void castor3d::Animable::cleanupAnimations ( )

Empties the animations map.

◆ doGetAnimation() [1/2]

template<typename AnimationType >
AnimationType & castor3d::Animable::doGetAnimation ( castor::String const & name)
inlineprotected

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

References getAnimation().

Here is the call graph for this function:

◆ doGetAnimation() [2/2]

template<typename AnimationType >
AnimationType const & castor3d::Animable::doGetAnimation ( castor::String const & name) const
inlineprotected

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

References getAnimation().

Here is the call graph for this function:

◆ doRemoveAnimation()

C3D_API void castor3d::Animable::doRemoveAnimation ( castor::String const & name)
protected

Removes an animation.

Parameters
[in]nameThe animation name

◆ getAnimation() [1/2]

C3D_API Animation & castor3d::Animable::getAnimation ( castor::String const & name)

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

◆ getAnimation() [2/2]

C3D_API Animation const & castor3d::Animable::getAnimation ( castor::String const & name) const

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

Referenced by doGetAnimation(), and doGetAnimation().

Here is the caller graph for this function:

◆ getAnimations()

AnimationsMap const & castor3d::Animable::getAnimations ( ) const
inline
Returns
The animations.

References m_animations.

◆ hasAnimation() [1/2]

virtual C3D_API bool castor3d::Animable::hasAnimation ( ) const
virtualnoexcept
Returns
true if the object has an animation.

Reimplemented in castor3d::TextureUnit.

◆ hasAnimation() [2/2]

C3D_API bool castor3d::Animable::hasAnimation ( castor::String const & name) const
Parameters
[in]nameThe animation name
Returns
true it the object has an animation with given name.

◆ operator=() [1/2]

C3D_API Animable & castor3d::Animable::operator= ( Animable && rhs)
protecteddeletenoexcept

◆ operator=() [2/2]

C3D_API Animable & castor3d::Animable::operator= ( Animable const & rhs)
protecteddelete

Member Data Documentation

◆ m_animations

AnimationsMap castor3d::Animable::m_animations
protected

All animations.

Referenced by getAnimations().


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