3#include "Engine/Core/Asset.h"
4#include "Engine/Files/AssetPath.h"
7#include <glm/mat4x4.hpp>
8#include <glm/gtc/quaternion.hpp>
10#include <unordered_map>
72 for (uint32_t i = 0; i <
joints_.size(); ++i) {
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of en...
A manager which is used to look up existing assets and their loading state.
SkinAssetManager()=default
Creates an empty skin asset manager.
std::unordered_map< std::string, int32_t > jointNameMap_
void buildNameIndex()
Rebuilds the name-to-index lookup table.
const Joint & getJoint(uint32_t index) const
Getter.
glm::mat4 armatureTransform_
Transform applied by the source armature node.
int32_t getSkeletonRootIndex() const
Getter.
int32_t findJointByName(const std::string &name) const
Finds joint index by name.
int32_t skeletonRootIndex_
Root joint index, or -1 when no root is assigned.
std::vector< Joint > joints_
Joint hierarchy and bind-pose data.
Skin()
Creates a loaded skin with no joints.
const std::vector< Joint > & getJoints() const
Getter.
uint32_t getBoneCount() const
Getter.
A single joint in a skeleton hierarchy.
glm::vec3 restScale
Rest-pose local scale.
int32_t parentIndex
Parent joint index, or -1 for a root joint.
glm::quat restRotation
Rest-pose local rotation.
glm::mat4 inverseBindMatrix
Inverse bind matrix from the source skin.
glm::vec3 restTranslation
Rest-pose local translation.
std::string name
Joint name from the source asset.