20#ifndef KEMENA_NO_ASSIMP
37#ifndef KEMENA_NO_ASSIMP
54 std::vector<kKeyPosition> positions,
55 std::vector<kKeyRotation> rotations,
56 std::vector<kKeyScale> scales);
105 std::vector<kKeyPosition> positions;
106 std::vector<kKeyRotation> rotations;
107 std::vector<kKeyScale> scales;
125 float getScaleFactor(
float lastTimeStamp,
float nextTimeStamp,
float animationTime,
float duration);
132 kMat4 interpolatePosition(
float animationTime);
139 kMat4 interpolateRotation(
float animationTime);
146 kMat4 interpolateScale(
float animationTime);
int getRotationIndex(float animationTime)
Finds the index of the rotation keyframe just before animationTime.
const int getID() const
Returns the bone palette index.
int getScaleIndex(float animationTime)
Finds the index of the scale keyframe just before animationTime.
const kMat4 getLocalTransform() const
Returns the interpolated local transform for the current time.
int getPositionIndex(float animationTime)
Finds the index of the position keyframe just before animationTime.
kBone(const kString &boneName, int boneID, std::vector< kKeyPosition > positions, std::vector< kKeyRotation > rotations, std::vector< kKeyScale > scales)
Constructs a bone from already-decoded keyframe arrays.
void update(float animationTime)
Interpolates all channels and updates the local transform.
const kString getName() const
Returns the bone name.
kBone(const kString &boneName, int boneID, aiNodeAnim *channel)
Constructs a bone from an Assimp animation channel.
Core type aliases, enumerations, structs, and utility functions used throughout the engine.
Top-level Kemena3D engine namespace.
Definition kanimation.h:23
std::string kString
Standard string alias.
Definition kdatatype.h:42
glm::mat4 kMat4
4x4 float matrix.
Definition kdatatype.h:39