Castor3D 0.16.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 (castor::String name, Scene &scene)
 Constructor.
 
C3D_API ~Skeleton () noexcept override
 Destructor.
 
C3D_API SkeletonNodecreateNode (castor::String name)
 Creates a node.
 
C3D_API BoneNodecreateBone (castor::String name, castor::Matrix4x4f const &inverseTransform)
 Creates a bone.
 
C3D_API SkeletonNodefindNode (castor::String const &name) const
 Finds a bone from a name.
 
C3D_API SkeletonNodegetRootNode () const
 
C3D_API void setNodeParent (SkeletonNode &node, SkeletonNode &parent)
 Adds a node to another node's children.
 
C3D_API SkeletonAnimationcreateAnimation (castor::String const &name)
 Creates an animation.
 
C3D_API void removeAnimation (castor::String const &name)
 Removes an animation.
 
C3D_API void computeContainers (Mesh &mesh)
 Computes the bounding box and sphere for each bone, for given mesh.
 
castor::Matrix4x4f const & getGlobalInverseTransform () const
 
void setGlobalInverseTransform (castor::Matrix4x4f const &transform)
 
castor::Vector< BoneNode * > const & getBones () const
 
SkeletonNodePtrArray const & getNodes () const
 
size_t getNodesCount () const
 
size_t getBonesCount () const
 
castor::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 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 castor3d::AnimableT< Engine >
virtual C3D_API ~AnimableT () noexcept=default
 
void cleanupAnimations ()
 Empties the animations map.
 
bool hasAnimation () const
 
bool hasAnimation (castor::String const &name) const
 
Animation const & getAnimation (castor::String const &name) const
 Retrieves an animation.
 
AnimationgetAnimation (castor::String const &name)
 Retrieves an animation.
 
void addAnimation (AnimationPtr animation)
 Adds an animation.
 
AnimationsMap const & getAnimations () const
 
- Public Member Functions inherited from castor::OwnedBy< Owner >
Owner * getOwner () const
 

Friends

class BinaryWriter< Skeleton >
 
class BinaryParser< Skeleton >
 

Additional Inherited Members

- Protected Types inherited from castor3d::AnimableT< Engine >
using Animation
 
using AnimationPtr
 
using AnimationsMap
 
- Protected Member Functions inherited from castor3d::AnimableT< Engine >
void doRemoveAnimation (castor::String const &name)
 Removes an animation.
 
AnimationTypedoGetAnimation (castor::String const &name)
 Retrieves an animation.
 
AnimationType const & doGetAnimation (castor::String const &name) const
 Retrieves an animation.
 
 AnimableT (Engine &owner)
 
C3D_API AnimableT (AnimableT &&rhs) noexcept=default
 
C3D_API AnimableT (AnimableT const &rhs)=delete
 
C3D_API AnimableToperator= (AnimableT &&rhs) noexcept=delete
 
C3D_API AnimableToperator= (AnimableT const &rhs)=delete
 
- Protected Member Functions inherited from castor::OwnedBy< Owner >
 OwnedBy (Owner &owner)
 Constructor.
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 
- Protected Attributes inherited from castor3d::AnimableT< Engine >
AnimationsMap 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 ( castor::String name,
Scene & scene )

Constructor.

Parameters
[in]nameThe skeleton name.
[in]sceneThe scene.

◆ ~Skeleton()

C3D_API castor3d::Skeleton::~Skeleton ( )
overridenoexcept

Destructor.

Member Function Documentation

◆ 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 BoneNode * castor3d::Skeleton::createBone ( castor::String name,
castor::Matrix4x4f const & inverseTransform )

Creates a bone.

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

◆ createNode()

C3D_API SkeletonNode * castor3d::Skeleton::createNode ( castor::String name)

Creates a node.

Parameters
[in]nameThe node name.

◆ findNode()

C3D_API SkeletonNode * castor3d::Skeleton::findNode ( castor::String const & name) const

Finds a bone from a name.

Parameters
[in]nameThe bone name.

◆ getBones()

castor::Vector< BoneNode * > const & castor3d::Skeleton::getBones ( ) const
inline

◆ getBonesCount()

size_t castor3d::Skeleton::getBonesCount ( ) const
inline

◆ getContainers()

castor::Vector< castor::BoundingBox > const & castor3d::Skeleton::getContainers ( Mesh & mesh) const
inline

◆ getGlobalInverseTransform()

castor::Matrix4x4f const & castor3d::Skeleton::getGlobalInverseTransform ( ) const
inline

◆ getNodes()

SkeletonNodePtrArray const & castor3d::Skeleton::getNodes ( ) const
inline

◆ getNodesCount()

size_t castor3d::Skeleton::getNodesCount ( ) const
inline

◆ getRootNode()

C3D_API SkeletonNode * castor3d::Skeleton::getRootNode ( ) const
Returns
The root skeleton node.

◆ 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

◆ setGlobalInverseTransform()

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

◆ setNodeParent()

C3D_API void castor3d::Skeleton::setNodeParent ( SkeletonNode & node,
SkeletonNode & parent )

Adds a node to another node's children.

Parameters
[in]nodeThe node.
[in]parentThe parent bone.

Friends And Related Symbol 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: