Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Friends | List of all members
castor3d::Skeleton Class Reference

#include <Skeleton.hpp>

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

Public Member Functions

C3D_API Skeleton (Scene &scene)
 Constructor. More...
 
C3D_API ~Skeleton () override
 Destructor. More...
 
C3D_API BoneSPtr createBone (castor::String const &name, castor::Matrix4x4f const &offset)
 Creates a bone. More...
 
C3D_API BoneSPtr findBone (castor::String const &name) const
 Finds a bone from a name. More...
 
C3D_API void setBoneParent (BoneSPtr bone, BoneSPtr parent)
 adds a bone to another bone's children More...
 
C3D_API SkeletonAnimationcreateAnimation (castor::String const &name)
 Creates an animation. More...
 
C3D_API void removeAnimation (castor::String const &name)
 Removes an animation. More...
 
C3D_API void computeContainers (Mesh &mesh)
 Computes the bounding box and sphere for each bone, for given mesh. More...
 
castor::Matrix4x4f const & getGlobalInverseTransform () const
 
void setGlobalInverseTransform (castor::Matrix4x4f const &transform)
 Sets the global inverse transform. More...
 
size_t getBonesCount () const
 
auto begin ()
 
auto begin () const
 
auto end ()
 
auto end () const
 
std::vector< castor::BoundingBox > const & getContainers (Mesh &mesh) const
 
SceneRPtr getScene () const
 
C3D_API Skeleton (Skeleton &&rhs)=default
 
C3D_API Skeletonoperator= (Skeleton &&rhs)=delete
 
C3D_API Skeleton (Skeleton const &rhs)=delete
 
C3D_API Skeletonoperator= (Skeleton const &rhs)=delete
 
- Public Member Functions inherited from castor3d::AnimableT< Engine >
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
 

Friends

class BinaryWriter< Skeleton >
 
class BinaryParser< Skeleton >
 

Additional Inherited Members

- Protected Types inherited from castor3d::AnimableT< Engine >
using Animation = AnimationT< Engine >
 
using AnimationPtr = std::unique_ptr< Animation >
 
using AnimationPtrStrMap = std::map< castor::String, AnimationPtr >
 
- Protected Member Functions inherited from castor3d::AnimableT< Engine >
void doRemoveAnimation (castor::String const &name)
 Removes an animation. More...
 
AnimationTypedoGetAnimation (castor::String const &name)
 Retrieves an animation. More...
 
AnimationType const & doGetAnimation (castor::String const &name) const
 Retrieves an animation. More...
 
 AnimableT (Engine &owner)
 
C3D_API AnimableT (AnimableT &&rhs)=default
 
C3D_API AnimableT (AnimableT const &rhs)=delete
 
C3D_API AnimableToperator= (AnimableT &&rhs)=delete
 
C3D_API AnimableToperator= (AnimableT const &rhs)=delete
 
- Protected Attributes inherited from castor3d::AnimableT< Engine >
AnimationPtrStrMap m_animations
 

Constructor & Destructor Documentation

◆ Skeleton() [1/3]

C3D_API castor3d::Skeleton::Skeleton ( Skeleton &&  rhs)
default

name Copy / Move.

◆ Skeleton() [2/3]

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

◆ Skeleton() [3/3]

C3D_API castor3d::Skeleton::Skeleton ( Scene scene)
explicit

Constructor.

Parameters
[in]sceneThe scene.

◆ ~Skeleton()

C3D_API castor3d::Skeleton::~Skeleton ( )
override

Destructor.

Member Function Documentation

◆ begin() [1/2]

auto castor3d::Skeleton::begin ( )
inline
Returns
An iterator to the first bone.

◆ begin() [2/2]

auto castor3d::Skeleton::begin ( ) const
inline
Returns
An iterator to the first bone.

◆ computeContainers()

C3D_API void castor3d::Skeleton::computeContainers ( Mesh mesh)

Computes the bounding box and sphere for each bone, for given mesh.

◆ createAnimation()

C3D_API SkeletonAnimation & castor3d::Skeleton::createAnimation ( castor::String const &  name)

Creates an animation.

Parameters
[in]nameThe animation name
Returns
The animation

◆ createBone()

C3D_API BoneSPtr castor3d::Skeleton::createBone ( castor::String const &  name,
castor::Matrix4x4f const &  offset 
)

Creates a bone.

Parameters
[in]nameThe bone name.
[in]offsetThe transfromation matrix from mesh space to bone space.

◆ end() [1/2]

auto castor3d::Skeleton::end ( )
inline
Returns
An iterator to the end of the bones array.

◆ end() [2/2]

auto castor3d::Skeleton::end ( ) const
inline
Returns
An iterator to the end of the bones array.

◆ findBone()

C3D_API BoneSPtr castor3d::Skeleton::findBone ( castor::String const &  name) const

Finds a bone from a name.

Parameters
[in]nameThe bone name.

◆ getBonesCount()

size_t castor3d::Skeleton::getBonesCount ( ) const
inline
Returns
The bones count.

◆ getContainers()

std::vector< castor::BoundingBox > const & castor3d::Skeleton::getContainers ( Mesh mesh) const
inline
Returns
The bones boxes.

◆ getGlobalInverseTransform()

castor::Matrix4x4f const & castor3d::Skeleton::getGlobalInverseTransform ( ) const
inline
Returns
The global inverse transform.

◆ getScene()

SceneRPtr castor3d::Skeleton::getScene ( ) const
inline

◆ operator=() [1/2]

C3D_API Skeleton & castor3d::Skeleton::operator= ( Skeleton &&  rhs)
delete

◆ operator=() [2/2]

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

◆ removeAnimation()

C3D_API void castor3d::Skeleton::removeAnimation ( castor::String const &  name)

Removes an animation.

Parameters
[in]nameThe animation name

◆ setBoneParent()

C3D_API void castor3d::Skeleton::setBoneParent ( BoneSPtr  bone,
BoneSPtr  parent 
)

adds a bone to another bone's children

Parameters
[in]boneThe bone.
[in]parentThe parent bone.

◆ setGlobalInverseTransform()

void castor3d::Skeleton::setGlobalInverseTransform ( castor::Matrix4x4f const &  transform)
inline

Sets the global inverse transform.

Parameters
[in]transformThe new value.

Friends And Related Function Documentation

◆ BinaryParser< Skeleton >

friend class BinaryParser< Skeleton >
friend

◆ BinaryWriter< Skeleton >

friend class BinaryWriter< Skeleton >
friend

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