![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <Skeleton.hpp>
Public Member Functions | |
C3D_API | Skeleton (castor::String name, Scene &scene) |
Constructor. | |
C3D_API | ~Skeleton () noexcept override |
Destructor. | |
C3D_API SkeletonNode * | createNode (castor::String name) |
Creates a node. | |
C3D_API BoneNode * | createBone (castor::String name, castor::Matrix4x4f const &inverseTransform) |
Creates a bone. | |
C3D_API SkeletonNode * | findNode (castor::String const &name) const |
Finds a bone from a name. | |
C3D_API SkeletonNode * | getRootNode () const |
C3D_API void | setNodeParent (SkeletonNode &node, SkeletonNode &parent) |
Adds a node to another node's children. | |
C3D_API SkeletonAnimation & | createAnimation (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. | |
C3D_API void | cloneInto (Skeleton &output) const |
Clones this object into the given one. | |
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 Skeleton & | operator= (Skeleton &&rhs)=delete |
C3D_API | Skeleton (Skeleton const &rhs)=delete |
C3D_API Skeleton & | operator= (Skeleton const &rhs)=delete |
![]() | |
NamedBaseT (T name) noexcept | |
Constructor. | |
T const & | getName () const noexcept |
Retrieves the name. | |
void | rename (T name) noexcept |
![]() | |
virtual C3D_API | ~Animable () noexcept=default |
C3D_API void | cleanupAnimations () |
Empties the animations map. | |
virtual C3D_API bool | hasAnimation () const noexcept |
C3D_API bool | hasAnimation (castor::String const &name) const |
C3D_API Animation const & | getAnimation (castor::String const &name) const |
Retrieves an animation. | |
C3D_API Animation & | getAnimation (castor::String const &name) |
Retrieves an animation. | |
C3D_API void | addAnimation (AnimationPtr animation) |
Adds an animation. | |
AnimationsMap const & | getAnimations () const |
![]() | |
Engine * | getOwner () const noexcept |
void | setOwner (Engine &owner) noexcept |
Static Public Member Functions | |
static C3D_API void | addParsers (castor::AttributeParsers &result) |
Friends | |
class | BinaryWriter< Skeleton > |
class | BinaryParser< Skeleton > |
Additional Inherited Members | |
![]() | |
using | AnimationPtr = castor::UniquePtr< Animation > |
using | AnimationsMap = castor::StringMap< AnimationPtr > |
![]() | |
C3D_API void | doRemoveAnimation (castor::String const &name) |
Removes an animation. | |
template<typename AnimationType > | |
AnimationType & | doGetAnimation (castor::String const &name) |
Retrieves an animation. | |
template<typename AnimationType > | |
AnimationType const & | doGetAnimation (castor::String const &name) const |
Retrieves an animation. | |
C3D_API | Animable (Engine &owner) |
C3D_API | Animable (Animable &&rhs) noexcept=default |
C3D_API Animable & | operator= (Animable &&rhs) noexcept=delete |
C3D_API | Animable (Animable const &rhs)=delete |
C3D_API Animable & | operator= (Animable const &rhs)=delete |
![]() | |
OwnedBy (Engine &owner) noexcept | |
Constructor. | |
![]() | |
T | m_name |
![]() | |
AnimationsMap | m_animations |
C3D_API castor3d::Skeleton::Skeleton | ( | castor::String | name, |
Scene & | scene ) |
Constructor.
[in] | name | The skeleton name. |
[in] | scene | The scene. |
|
overridenoexcept |
Destructor.
|
static |
Clones this object into the given one.
[in,out] | output | Receives this object's data. |
Computes the bounding box and sphere for each bone, for given mesh.
C3D_API SkeletonAnimation & castor3d::Skeleton::createAnimation | ( | castor::String const & | name | ) |
Creates an animation.
[in] | name | The animation name |
C3D_API BoneNode * castor3d::Skeleton::createBone | ( | castor::String | name, |
castor::Matrix4x4f const & | inverseTransform ) |
Creates a bone.
[in] | name | The bone name. |
[in] | inverseTransform | The transfromation matrix from mesh space to bone space. |
C3D_API SkeletonNode * castor3d::Skeleton::createNode | ( | castor::String | name | ) |
Creates a node.
[in] | name | The node name. |
C3D_API SkeletonNode * castor3d::Skeleton::findNode | ( | castor::String const & | name | ) | const |
Finds a bone from a name.
[in] | name | The bone name. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API SkeletonNode * castor3d::Skeleton::getRootNode | ( | ) | const |
|
inline |
C3D_API void castor3d::Skeleton::removeAnimation | ( | castor::String const & | name | ) |
Removes an animation.
[in] | name | The animation name |
|
inline |
C3D_API void castor3d::Skeleton::setNodeParent | ( | SkeletonNode & | node, |
SkeletonNode & | parent ) |
Adds a node to another node's children.
[in] | node | The node. |
[in] | parent | The parent bone. |
|
friend |
|
friend |