Castor3D  ..
Public Member Functions | Protected Attributes | List of all members
Castor3D::AnimatedObject Class Reference

Represents the animated objects. More...

+ Inheritance diagram for Castor3D::AnimatedObject:
+ Collaboration diagram for Castor3D::AnimatedObject:

Public Member Functions

C3D_API AnimatedObject (Castor::String const &p_name)
 Constructor. More...
 
C3D_API ~AnimatedObject ()
 Destructor. More...
 
C3D_API void Update (real p_tslf)
 Updates the animations of the object, given the time since the last frame. More...
 
C3D_API void FillShader (Matrix4x4rFrameVariable &p_variable)
 Fills a shader variable with this object's skeleton transforms. More...
 
C3D_API void StartAnimation (Castor::String const &p_name)
 Starts the animation identified by the given name. More...
 
C3D_API void StopAnimation (Castor::String const &p_name)
 Stops the animation identified by the given name. More...
 
C3D_API void PauseAnimation (Castor::String const &p_name)
 Pauses the animation identified by the given name. More...
 
C3D_API void StartAllAnimations ()
 Starts all animations. More...
 
C3D_API void StopAllAnimations ()
 Stops all animations. More...
 
C3D_API void PauseAllAnimations ()
 Pauses all animations. More...
 
C3D_API AnimationSPtr GetAnimation (Castor::String const &p_name)
 Retrieves an animation. More...
 
C3D_API void SetGeometry (GeometrySPtr p_geometry)
 Defines the geometry. More...
 
C3D_API void SetMesh (MeshSPtr p_mesh)
 Defines the mesh. More...
 
C3D_API void SetSkeleton (SkeletonSPtr p_skeleton)
 Defines the skeleton. More...
 
GeometrySPtr GetGeometry () const
 Retrieves the geometry. More...
 
MeshSPtr GetMesh () const
 Retrieves the mesh. More...
 
SkeletonSPtr GetSkeleton () const
 Retrieves the skeleton. More...
 
bool IsPlayingAnimation () const
 

Protected Attributes

AnimationPtrStrMap m_animations
 All animations. More...
 
AnimationPtrArray m_playingAnimations
 Currently playing animations. More...
 
GeometryWPtr m_geometry
 The geometry affected by the animations. More...
 
MeshWPtr m_mesh
 The mesh affected by the animations. More...
 
SkeletonWPtr m_skeleton
 The skeleton affected by the animations. More...
 

Detailed Description

Represents the animated objects.

Author
Sylvain DOREMUS
Version
0.7.0
Date
10/12/2013

Constructor & Destructor Documentation

◆ AnimatedObject()

C3D_API Castor3D::AnimatedObject::AnimatedObject ( Castor::String const &  p_name)

Constructor.

Parameters
[in]p_nameThe object name

◆ ~AnimatedObject()

C3D_API Castor3D::AnimatedObject::~AnimatedObject ( )

Destructor.

Member Function Documentation

◆ FillShader()

C3D_API void Castor3D::AnimatedObject::FillShader ( Matrix4x4rFrameVariable p_variable)

Fills a shader variable with this object's skeleton transforms.

Parameters
[out]p_variableReceives the transforms.

◆ GetAnimation()

C3D_API AnimationSPtr Castor3D::AnimatedObject::GetAnimation ( Castor::String const &  p_name)

Retrieves an animation.

Parameters
[in]p_nameThe animation name
Returns
The animation

◆ GetGeometry()

GeometrySPtr Castor3D::AnimatedObject::GetGeometry ( ) const
inline

Retrieves the geometry.

Returns
The geometry

References m_geometry.

◆ GetMesh()

MeshSPtr Castor3D::AnimatedObject::GetMesh ( ) const
inline

Retrieves the mesh.

Returns
The mesh

References m_mesh.

◆ GetSkeleton()

SkeletonSPtr Castor3D::AnimatedObject::GetSkeleton ( ) const
inline

Retrieves the skeleton.

Returns
The skeleton

References m_skeleton.

◆ IsPlayingAnimation()

bool Castor3D::AnimatedObject::IsPlayingAnimation ( ) const
inline
Returns
true if the object is playing an animation.

References m_playingAnimations.

◆ PauseAllAnimations()

C3D_API void Castor3D::AnimatedObject::PauseAllAnimations ( )

Pauses all animations.

◆ PauseAnimation()

C3D_API void Castor3D::AnimatedObject::PauseAnimation ( Castor::String const &  p_name)

Pauses the animation identified by the given name.

Parameters
[in]p_nameThe name of the animation

◆ SetGeometry()

C3D_API void Castor3D::AnimatedObject::SetGeometry ( GeometrySPtr  p_geometry)

Defines the geometry.

Parameters
[in]p_geometryThe geometry

◆ SetMesh()

C3D_API void Castor3D::AnimatedObject::SetMesh ( MeshSPtr  p_mesh)

Defines the mesh.

Parameters
[in]p_meshThe mesh

◆ SetSkeleton()

C3D_API void Castor3D::AnimatedObject::SetSkeleton ( SkeletonSPtr  p_skeleton)

Defines the skeleton.

Parameters
[in]p_skeletonThe skeleton

◆ StartAllAnimations()

C3D_API void Castor3D::AnimatedObject::StartAllAnimations ( )

Starts all animations.

◆ StartAnimation()

C3D_API void Castor3D::AnimatedObject::StartAnimation ( Castor::String const &  p_name)

Starts the animation identified by the given name.

Parameters
[in]p_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 &  p_name)

Stops the animation identified by the given name.

Parameters
[in]p_nameThe name of the animation

◆ Update()

C3D_API void Castor3D::AnimatedObject::Update ( real  p_tslf)

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

Parameters
[in]p_tslfTime elapsed since the last frame

Member Data Documentation

◆ m_animations

AnimationPtrStrMap Castor3D::AnimatedObject::m_animations
protected

All animations.

◆ m_geometry

GeometryWPtr Castor3D::AnimatedObject::m_geometry
protected

The geometry affected by the animations.

Referenced by GetGeometry().

◆ m_mesh

MeshWPtr Castor3D::AnimatedObject::m_mesh
protected

The mesh affected by the animations.

Referenced by GetMesh().

◆ m_playingAnimations

AnimationPtrArray Castor3D::AnimatedObject::m_playingAnimations
protected

Currently playing animations.

Referenced by IsPlayingAnimation().

◆ m_skeleton

SkeletonWPtr Castor3D::AnimatedObject::m_skeleton
protected

The skeleton affected by the animations.

Referenced by GetSkeleton().


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