Vulkan Schnee 0.0.1 (22840dc8)
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 ()
 Creates a loaded skin with no joints.
uint32_t getBoneCount () const
 Getter.
const Joint & getJoint (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)
 Creates a base asset and optionally allocates its default ECS entity.
virtual ~AssetBase ()
 Releases base asset resources.
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< Joint > joints_
 Joint hierarchy and bind-pose data.
int32_t skeletonRootIndex_ = -1
 Root joint index, or -1 when no root is assigned.
glm::mat4 armatureTransform_ = glm::mat4(1.0f)
 Transform applied by the source armature node.

Private Attributes

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

Additional Inherited Members

Protected Member Functions inherited from Asset::AssetBase
virtual void updateLoadingState ()
 Updates loadingState from derived asset data.
Protected Attributes inherited from Asset::AssetBase
CpuLoadingState loadingState = UNLOADED
 Current CPU loading state.
entt::registry & mainRegistry
 Registry that owns this asset's ECS data.
entt::entity data
 Entity containing the asset's component 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 ( )

Creates a loaded skin with no joints.

Member Function Documentation

◆ buildNameIndex()

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

Rebuilds the name-to-index lookup table.

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

References jointNameMap_.

◆ getBoneCount()

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

Getter.

Definition at line 40 of file SkinAsset.h.

References joints_.

◆ getJoint()

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

Getter.

Definition at line 45 of file SkinAsset.h.

References joints_.

◆ getJoints()

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

Getter.

Definition at line 50 of file SkinAsset.h.

References joints_.

◆ getSkeletonRootIndex()

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

Getter.

Definition at line 55 of file SkinAsset.h.

References skeletonRootIndex_.

Member Data Documentation

◆ armatureTransform_

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

Transform applied by the source armature node.

Definition at line 80 of file SkinAsset.h.

◆ jointNameMap_

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

Definition at line 83 of file SkinAsset.h.

Referenced by buildNameIndex(), and findJointByName().

◆ joints_

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

Joint hierarchy and bind-pose data.

Definition at line 78 of file SkinAsset.h.

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

◆ skeletonRootIndex_

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

Root joint index, or -1 when no root is assigned.

Definition at line 79 of file SkinAsset.h.

Referenced by getSkeletonRootIndex().


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