Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Public Attributes | List of all members
castor3d::AnimatedObjectGroup Class Reference

#include <AnimatedObjectGroup.hpp>

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

Public Types

using AnimatedObjectMap = castor::StringMap< AnimatedObjectUPtr >
 

Public Member Functions

C3D_API AnimatedObjectGroup (castor::String const &name, Scene &scene)
 Specified constructor.
 
C3D_API ~AnimatedObjectGroup () noexcept
 Destructor.
 
C3D_API AnimatedObjectRPtr addObject (SceneNode &node, castor::String const &name)
 Creates an AnimatedObject from the SceneNode given as a parameter, adds it to the list.
 
C3D_API AnimatedObjectRPtr addObject (Mesh &mesh, Geometry &geometry, castor::String const &name)
 Creates an AnimatedObject from the Mesh given as a parameter, adds it to the list.
 
C3D_API AnimatedObjectRPtr addObject (Skeleton &skeleton, Mesh &mesh, Geometry &geometry, castor::String const &name)
 Creates an AnimatedObject from the Skeleton given as a parameter, adds it to the list.
 
C3D_API AnimatedObjectRPtr addObject (TextureSourceInfo const &sourceInfo, TextureConfiguration const &config, Pass &pass)
 Creates an AnimatedObject for a texture, adds it to the list.
 
C3D_API bool addObject (AnimatedObjectUPtr object)
 adds an AnimatedObject to this group.
 
C3D_API AnimatedObjectfindObject (castor::String const &name) const
 Find an AnimatedObject given its name.
 
C3D_API bool addAnimation (castor::String const &name)
 adds the animation to the list.
 
C3D_API void setAnimationLooped (castor::String const &name, bool looped)
 Sets the loop status of wanted animation.
 
C3D_API void setAnimationScale (castor::String const &name, float scale)
 Sets the time scale of wanted animation.
 
C3D_API void setAnimationStartingPoint (castor::String const &name, castor::Milliseconds value)
 Sets the starting point of wanted animation.
 
C3D_API void setAnimationStoppingPoint (castor::String const &name, castor::Milliseconds value)
 Sets the stopping point of wanted animation.
 
C3D_API void setAnimationInterpolation (castor::String const &name, InterpolatorType mode)
 Sets the interpolation mode of wanted animation.
 
C3D_API void update (CpuUpdater &updater)
 CPU Update.
 
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.
 
GroupAnimationMap const & getAnimations () const
 
AnimatedObjectMap const & getObjects () 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
 
- Public Member Functions inherited from castor::OwnedBy< Scene >
Scene * getOwner () const
 

Public Attributes

OnAnimatedSkeletonChange onSkeletonAdded
 
OnAnimatedSkeletonChange onSkeletonRemoved
 
OnAnimatedMeshChange onMeshAdded
 
OnAnimatedMeshChange onMeshRemoved
 
OnAnimatedTextureChange onTextureAdded
 
OnAnimatedTextureChange onTextureRemoved
 
OnAnimatedSceneNodeChange onSceneNodeAdded
 
OnAnimatedSceneNodeChange onSceneNodeRemoved
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Scene >
 OwnedBy (Scene &owner)
 Constructor.
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Member Typedef Documentation

◆ AnimatedObjectMap

Constructor & Destructor Documentation

◆ AnimatedObjectGroup()

C3D_API castor3d::AnimatedObjectGroup::AnimatedObjectGroup ( castor::String const & name,
Scene & scene )

Specified constructor.

Parameters
[in]sceneThe scene
[in]nameThe group name

◆ ~AnimatedObjectGroup()

C3D_API castor3d::AnimatedObjectGroup::~AnimatedObjectGroup ( )
noexcept

Destructor.

Member Function Documentation

◆ addAnimation()

C3D_API bool castor3d::AnimatedObjectGroup::addAnimation ( castor::String const & name)

adds the animation to the list.

Parameters
[in]nameThe animation to add.
Returns
true if the animation didn't exist already.

◆ addObject() [1/5]

C3D_API bool castor3d::AnimatedObjectGroup::addObject ( AnimatedObjectUPtr object)

adds an AnimatedObject to this group.

Remarks
This function assumes the object has already been created in order to be put in this group (with the good scene and animations map)
Parameters
[in]objectThe AnimatedObject to add

◆ addObject() [2/5]

C3D_API AnimatedObjectRPtr castor3d::AnimatedObjectGroup::addObject ( Mesh & mesh,
Geometry & geometry,
castor::String const & name )

Creates an AnimatedObject from the Mesh given as a parameter, adds it to the list.

Parameters
[in]meshThe Mesh from which AnimatedObject is created.
[in]geometryThe geometry instantiating the mesh.
[in]nameThe Mesh instance name.

◆ addObject() [3/5]

C3D_API AnimatedObjectRPtr castor3d::AnimatedObjectGroup::addObject ( SceneNode & node,
castor::String const & name )

Creates an AnimatedObject from the SceneNode given as a parameter, adds it to the list.

Parameters
[in]nodeThe SceneNode from which AnimatedObject is created.
[in]nameThe SceneNode instance name.

◆ addObject() [4/5]

C3D_API AnimatedObjectRPtr castor3d::AnimatedObjectGroup::addObject ( Skeleton & skeleton,
Mesh & mesh,
Geometry & geometry,
castor::String const & name )

Creates an AnimatedObject from the Skeleton given as a parameter, adds it to the list.

Parameters
[in]skeletonThe Skeleton from which AnimatedObject is created.
[in]meshThe mesh to which the skeleton is bound.
[in]geometryThe geometry instantiating the mesh.
[in]nameThe Skeleton instance name.

◆ addObject() [5/5]

C3D_API AnimatedObjectRPtr castor3d::AnimatedObjectGroup::addObject ( TextureSourceInfo const & sourceInfo,
TextureConfiguration const & config,
Pass & pass )

Creates an AnimatedObject for a texture, adds it to the list.

Parameters
[in]sourceInfoThe texture source informations.
[in]configThe texture configuration.
[in]passThe pass instanciating the texture.

◆ findObject()

C3D_API AnimatedObject * castor3d::AnimatedObjectGroup::findObject ( castor::String const & name) const

Find an AnimatedObject given its name.

Parameters
[in]nameThe AnimatedObject name.

◆ getAnimations()

GroupAnimationMap const & castor3d::AnimatedObjectGroup::getAnimations ( ) const
inline
Returns
The animations map.

◆ getObjects()

AnimatedObjectMap const & castor3d::AnimatedObjectGroup::getObjects ( ) const
inline
Returns
The animated objects.

◆ pauseAllAnimations()

C3D_API void castor3d::AnimatedObjectGroup::pauseAllAnimations ( )

Pauses all animations.

◆ pauseAnimation()

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

Pauses the animation identified by the given name.

Parameters
[in]nameThe name of the animation

◆ setAnimationInterpolation()

C3D_API void castor3d::AnimatedObjectGroup::setAnimationInterpolation ( castor::String const & name,
InterpolatorType mode )

Sets the interpolation mode of wanted animation.

Parameters
[in]nameThe name of the animation.
[in]modeThe interpolation mode.

◆ setAnimationLooped()

C3D_API void castor3d::AnimatedObjectGroup::setAnimationLooped ( castor::String const & name,
bool looped )

Sets the loop status of wanted animation.

Parameters
[in]nameThe name of the animation.
[in]loopedThe status.

◆ setAnimationScale()

C3D_API void castor3d::AnimatedObjectGroup::setAnimationScale ( castor::String const & name,
float scale )

Sets the time scale of wanted animation.

Parameters
[in]nameThe name of the animation.
[in]scaleThe scale.

◆ setAnimationStartingPoint()

C3D_API void castor3d::AnimatedObjectGroup::setAnimationStartingPoint ( castor::String const & name,
castor::Milliseconds value )

Sets the starting point of wanted animation.

Parameters
[in]nameThe name of the animation.
[in]valueThe starting point.

◆ setAnimationStoppingPoint()

C3D_API void castor3d::AnimatedObjectGroup::setAnimationStoppingPoint ( castor::String const & name,
castor::Milliseconds value )

Sets the stopping point of wanted animation.

Parameters
[in]nameThe name of the animation.
[in]valueThe stopping point.

◆ startAllAnimations()

C3D_API void castor3d::AnimatedObjectGroup::startAllAnimations ( )

Starts all animations.

◆ startAnimation()

C3D_API void castor3d::AnimatedObjectGroup::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::AnimatedObjectGroup::stopAllAnimations ( )

Stops all animations.

◆ stopAnimation()

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

Stops the animation identified by the given name.

Parameters
[in]nameThe name of the animation

◆ update()

C3D_API void castor3d::AnimatedObjectGroup::update ( CpuUpdater & updater)

CPU Update.

Parameters
[in,out]updaterThe update data.

Member Data Documentation

◆ onMeshAdded

OnAnimatedMeshChange castor3d::AnimatedObjectGroup::onMeshAdded

◆ onMeshRemoved

OnAnimatedMeshChange castor3d::AnimatedObjectGroup::onMeshRemoved

◆ onSceneNodeAdded

OnAnimatedSceneNodeChange castor3d::AnimatedObjectGroup::onSceneNodeAdded

◆ onSceneNodeRemoved

OnAnimatedSceneNodeChange castor3d::AnimatedObjectGroup::onSceneNodeRemoved

◆ onSkeletonAdded

OnAnimatedSkeletonChange castor3d::AnimatedObjectGroup::onSkeletonAdded

◆ onSkeletonRemoved

OnAnimatedSkeletonChange castor3d::AnimatedObjectGroup::onSkeletonRemoved

◆ onTextureAdded

OnAnimatedTextureChange castor3d::AnimatedObjectGroup::onTextureAdded

◆ onTextureRemoved

OnAnimatedTextureChange castor3d::AnimatedObjectGroup::onTextureRemoved

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