SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Skeleton Class Reference

#include <Skeleton.hpp>

Public Member Functions

 Skeleton ()
int AddBone (const Bone &bone)
 Appends bone, assigning it the next bone id.
int AddNode (const NodeData &node)
 Appends node, returning its index in the node array.
void AddNodeChild (int parentIdx, int childIdx)
 Links childIdx under parentIdx in the node tree.
int FindBoneId (const std::string &name) const
int FindNodeIndex (const std::string &name) const
const BoneGetBone (int id) const
int GetBoneCount () const
const Math::Matrix4GetGlobalInverseTransform () const
const NodeDataGetNode (int idx) const
int GetNodeCount () const
int GetRootNodeIndex () const
bool HasNodeTree () const
void SetBoneParent (int boneId, int parentId)
 Reassigns the parent of boneId, e.g. once the full hierarchy is known.
void SetGlobalInverseTransform (const Math::Matrix4 &mat)

Detailed Description

Bone hierarchy plus the full imported scene node tree, used to drive skinned mesh animation.

Definition at line 36 of file Skeleton.hpp.

Constructor & Destructor Documentation

◆ Skeleton()

Sleak::Skeleton::Skeleton ( )
inline

Definition at line 38 of file Skeleton.hpp.

Member Function Documentation

◆ AddBone()

int Sleak::Skeleton::AddBone ( const Bone & bone)
inline

Appends bone, assigning it the next bone id.

Definition at line 50 of file Skeleton.hpp.

◆ AddNode()

int Sleak::Skeleton::AddNode ( const NodeData & node)
inline

Appends node, returning its index in the node array.

Definition at line 68 of file Skeleton.hpp.

◆ AddNodeChild()

void Sleak::Skeleton::AddNodeChild ( int parentIdx,
int childIdx )
inline

Links childIdx under parentIdx in the node tree.

Definition at line 76 of file Skeleton.hpp.

◆ FindBoneId()

int Sleak::Skeleton::FindBoneId ( const std::string & name) const
inline

Definition at line 42 of file Skeleton.hpp.

◆ FindNodeIndex()

int Sleak::Skeleton::FindNodeIndex ( const std::string & name) const
inline

Definition at line 86 of file Skeleton.hpp.

◆ GetBone()

const Bone & Sleak::Skeleton::GetBone ( int id) const
inline

Definition at line 47 of file Skeleton.hpp.

◆ GetBoneCount()

int Sleak::Skeleton::GetBoneCount ( ) const
inline

Definition at line 40 of file Skeleton.hpp.

◆ GetGlobalInverseTransform()

const Math::Matrix4 & Sleak::Skeleton::GetGlobalInverseTransform ( ) const
inline

Definition at line 59 of file Skeleton.hpp.

◆ GetNode()

const NodeData & Sleak::Skeleton::GetNode ( int idx) const
inline

Definition at line 82 of file Skeleton.hpp.

◆ GetNodeCount()

int Sleak::Skeleton::GetNodeCount ( ) const
inline

Definition at line 81 of file Skeleton.hpp.

◆ GetRootNodeIndex()

int Sleak::Skeleton::GetRootNodeIndex ( ) const
inline

Definition at line 84 of file Skeleton.hpp.

◆ HasNodeTree()

bool Sleak::Skeleton::HasNodeTree ( ) const
inline

Definition at line 91 of file Skeleton.hpp.

◆ SetBoneParent()

void Sleak::Skeleton::SetBoneParent ( int boneId,
int parentId )
inline

Reassigns the parent of boneId, e.g. once the full hierarchy is known.

Definition at line 94 of file Skeleton.hpp.

◆ SetGlobalInverseTransform()

void Sleak::Skeleton::SetGlobalInverseTransform ( const Math::Matrix4 & mat)
inline

Definition at line 63 of file Skeleton.hpp.