Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
castor3d::AnimableT< AnimableHandlerT > Class Template Reference

Animable public interface. More...

#include <Animable.hpp>

Inheritance diagram for castor3d::AnimableT< AnimableHandlerT >:
Inheritance graph
[legend]
Collaboration diagram for castor3d::AnimableT< AnimableHandlerT >:
Collaboration graph
[legend]

Public Member Functions

virtual C3D_API ~AnimableT ()=default
 
void cleanupAnimations ()
 Empties the animations map. More...
 
bool hasAnimation () const
 
bool hasAnimation (castor::String const &name) const
 
Animation const & getAnimation (castor::String const &name) const
 Retrieves an animation. More...
 
AnimationgetAnimation (castor::String const &name)
 Retrieves an animation. More...
 
void addAnimation (AnimationPtr animation)
 Adds an animation. More...
 
AnimationPtrStrMap const & getAnimations () const
 

Protected Types

using Animation = AnimationT< AnimableHandlerT >
 
using AnimationPtr = std::unique_ptr< Animation >
 
using AnimationPtrStrMap = std::map< castor::String, AnimationPtr >
 

Protected Member Functions

void doRemoveAnimation (castor::String const &name)
 Removes an animation. More...
 
template<typename AnimationType >
AnimationTypedoGetAnimation (castor::String const &name)
 Retrieves an animation. More...
 
template<typename AnimationType >
AnimationType const & doGetAnimation (castor::String const &name) const
 Retrieves an animation. More...
 
Construction / Destruction.
 AnimableT (AnimableHandlerT &owner)
 
C3D_API AnimableT (AnimableT &&rhs)=default
 
C3D_API AnimableToperator= (AnimableT &&rhs)=delete
 
C3D_API AnimableT (AnimableT const &rhs)=delete
 
C3D_API AnimableToperator= (AnimableT const &rhs)=delete
 

Protected Attributes

AnimationPtrStrMap m_animations
 

Detailed Description

template<typename AnimableHandlerT>
class castor3d::AnimableT< AnimableHandlerT >

Animable public interface.

Member Typedef Documentation

◆ Animation

template<typename AnimableHandlerT >
using castor3d::AnimableT< AnimableHandlerT >::Animation = AnimationT< AnimableHandlerT >
protected

◆ AnimationPtr

template<typename AnimableHandlerT >
using castor3d::AnimableT< AnimableHandlerT >::AnimationPtr = std::unique_ptr< Animation >
protected

◆ AnimationPtrStrMap

template<typename AnimableHandlerT >
using castor3d::AnimableT< AnimableHandlerT >::AnimationPtrStrMap = std::map< castor::String, AnimationPtr >
protected

Constructor & Destructor Documentation

◆ AnimableT() [1/3]

template<typename AnimableHandlerT >
castor3d::AnimableT< AnimableHandlerT >::AnimableT ( AnimableHandlerT &  owner)
inlineexplicitprotected

◆ AnimableT() [2/3]

template<typename AnimableHandlerT >
C3D_API castor3d::AnimableT< AnimableHandlerT >::AnimableT ( AnimableT< AnimableHandlerT > &&  rhs)
protecteddefault

◆ AnimableT() [3/3]

template<typename AnimableHandlerT >
C3D_API castor3d::AnimableT< AnimableHandlerT >::AnimableT ( AnimableT< AnimableHandlerT > const &  rhs)
protecteddelete

◆ ~AnimableT()

template<typename AnimableHandlerT >
virtual C3D_API castor3d::AnimableT< AnimableHandlerT >::~AnimableT ( )
virtualdefault

Member Function Documentation

◆ addAnimation()

template<typename AnimableHandlerT >
void castor3d::AnimableT< AnimableHandlerT >::addAnimation ( AnimationPtr  animation)

Adds an animation.

Parameters
[in]animationThe animation.

◆ cleanupAnimations()

template<typename AnimableHandlerT >
void castor3d::AnimableT< AnimableHandlerT >::cleanupAnimations ( )
inline

Empties the animations map.

◆ doGetAnimation() [1/2]

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

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

◆ doGetAnimation() [2/2]

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

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

◆ doRemoveAnimation()

template<typename AnimableHandlerT >
void castor3d::AnimableT< AnimableHandlerT >::doRemoveAnimation ( castor::String const &  name)
inlineprotected

Removes an animation.

Parameters
[in]nameThe animation name

◆ getAnimation() [1/2]

template<typename AnimableHandlerT >
Animation & castor3d::AnimableT< AnimableHandlerT >::getAnimation ( castor::String const &  name)
inline

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

◆ getAnimation() [2/2]

template<typename AnimableHandlerT >
Animation const & castor3d::AnimableT< AnimableHandlerT >::getAnimation ( castor::String const &  name) const
inline

Retrieves an animation.

Parameters
[in]nameThe animation name
Returns
The animation

◆ getAnimations()

template<typename AnimableHandlerT >
AnimationPtrStrMap const & castor3d::AnimableT< AnimableHandlerT >::getAnimations ( ) const
inline
Returns
The animations.

References castor3d::AnimableT< AnimableHandlerT >::m_animations.

◆ hasAnimation() [1/2]

template<typename AnimableHandlerT >
bool castor3d::AnimableT< AnimableHandlerT >::hasAnimation ( ) const
inline
Returns
true if the object has an animation.

◆ hasAnimation() [2/2]

template<typename AnimableHandlerT >
bool castor3d::AnimableT< AnimableHandlerT >::hasAnimation ( castor::String const &  name) const
inline
Parameters
[in]nameThe animation name
Returns
true it the object has an animation with given name.

◆ operator=() [1/2]

template<typename AnimableHandlerT >
C3D_API AnimableT & castor3d::AnimableT< AnimableHandlerT >::operator= ( AnimableT< AnimableHandlerT > &&  rhs)
protecteddelete

◆ operator=() [2/2]

template<typename AnimableHandlerT >
C3D_API AnimableT & castor3d::AnimableT< AnimableHandlerT >::operator= ( AnimableT< AnimableHandlerT > const &  rhs)
protecteddelete

Member Data Documentation

◆ m_animations

template<typename AnimableHandlerT >
AnimationPtrStrMap castor3d::AnimableT< AnimableHandlerT >::m_animations
protected

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