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>

Inheritance diagram for Engine::Assets::Skin:
Collaboration diagram for Engine::Assets::Skin:

Public Member Functions

 Skin ()
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 Member Functions inherited from Asset::AssetBase
 AssetBase (bool initializeDefaultEntity=false)
virtual ~AssetBase ()
CpuLoadingState getLoadingState ()
 Gets the loading state of this asset.
void requestLoad ()
 If this asset is in the UNLOADED state it will get added to the assets to load.
virtual void unload ()
 Base function for unloading the ecs data.
entt::entity getEntity () const
 Getter for data.

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_

Additional Inherited Members

Protected Member Functions inherited from Asset::AssetBase
virtual void updateLoadingState ()
Protected Attributes inherited from Asset::AssetBase
CpuLoadingState loadingState = UNLOADED
entt::registry & mainRegistry
entt::entity data

Detailed Description

Skeleton definition loaded from glTF skin data.

Definition at line 30 of file SkinAsset.h.

Constructor & Destructor Documentation

◆ Skin()

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

Member Function Documentation

◆ buildNameIndex()

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

Rebuilds the name-to-index lookup table.

Definition at line 66 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 58 of file SkinAsset.h.

References jointNameMap_.

◆ getBoneCount()

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

Getter.

Definition at line 37 of file SkinAsset.h.

References joints_.

◆ getJoint()

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

Getter.

Definition at line 42 of file SkinAsset.h.

References joints_.

◆ getJoints()

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

Getter.

Definition at line 47 of file SkinAsset.h.

References joints_.

◆ getSkeletonRootIndex()

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

Getter.

Definition at line 52 of file SkinAsset.h.

References skeletonRootIndex_.

Member Data Documentation

◆ armatureTransform_

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

Definition at line 77 of file SkinAsset.h.

◆ jointNameMap_

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

Definition at line 80 of file SkinAsset.h.

Referenced by buildNameIndex(), and findJointByName().

◆ joints_

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

Definition at line 75 of file SkinAsset.h.

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

◆ skeletonRootIndex_

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

Definition at line 76 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