Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::Skin Class Reference

Skeleton definition loaded from glTF skin data. More...

#include <SkinAsset.h>

Collaboration diagram for Engine::Assets::Skin:

Public Member Functions

 Skin ()=default
uint32_t getBoneCount () const
 Getter.
const JointgetJoint (uint32_t index) const
 Getter.
const std::vector< Joint > & getJoints () const
 Getter.
int32_t getSkeletonRootIndex () const
 Getter.
int32_t findJointByName (const std::string &name) const
 Finds joint index by name.
void buildNameIndex ()
 Rebuilds the name-to-index lookup table.

Public Attributes

std::vector< Jointjoints_
int32_t skeletonRootIndex_ = -1
glm::mat4 armatureTransform_ = glm::mat4(1.0f)

Private Attributes

std::unordered_map< std::string, int32_t > jointNameMap_

Detailed Description

Skeleton definition loaded from glTF skin data.

Definition at line 27 of file SkinAsset.h.

Constructor & Destructor Documentation

◆ Skin()

Engine::Assets::Skin::Skin ( )
default

Member Function Documentation

◆ buildNameIndex()

void Engine::Assets::Skin::buildNameIndex ( )
inline

Rebuilds the name-to-index lookup table.

Definition at line 63 of file SkinAsset.h.

References jointNameMap_, and joints_.

◆ findJointByName()

int32_t Engine::Assets::Skin::findJointByName ( const std::string & name) const
inlinenodiscard

Finds joint index by name.

Returns
Joint index or -1 if not found.

Definition at line 55 of file SkinAsset.h.

References jointNameMap_.

◆ getBoneCount()

uint32_t Engine::Assets::Skin::getBoneCount ( ) const
inlinenodiscard

Getter.

Definition at line 34 of file SkinAsset.h.

References joints_.

◆ getJoint()

const Joint & Engine::Assets::Skin::getJoint ( uint32_t index) const
inlinenodiscard

Getter.

Definition at line 39 of file SkinAsset.h.

References joints_.

◆ getJoints()

const std::vector< Joint > & Engine::Assets::Skin::getJoints ( ) const
inlinenodiscard

Getter.

Definition at line 44 of file SkinAsset.h.

References joints_.

◆ getSkeletonRootIndex()

int32_t Engine::Assets::Skin::getSkeletonRootIndex ( ) const
inlinenodiscard

Getter.

Definition at line 49 of file SkinAsset.h.

References skeletonRootIndex_.

Member Data Documentation

◆ armatureTransform_

glm::mat4 Engine::Assets::Skin::armatureTransform_ = glm::mat4(1.0f)

Definition at line 74 of file SkinAsset.h.

◆ jointNameMap_

std::unordered_map<std::string, int32_t> Engine::Assets::Skin::jointNameMap_
private

Definition at line 77 of file SkinAsset.h.

Referenced by buildNameIndex(), and findJointByName().

◆ joints_

std::vector<Joint> Engine::Assets::Skin::joints_

Definition at line 72 of file SkinAsset.h.

Referenced by buildNameIndex(), getBoneCount(), getJoint(), and getJoints().

◆ skeletonRootIndex_

int32_t Engine::Assets::Skin::skeletonRootIndex_ = -1

Definition at line 73 of file SkinAsset.h.

Referenced by getSkeletonRootIndex().


The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Animation/SkinAsset.h