AnimationData

Stores the animation skeleton/bones, stores the animations poses, and makes this information accessible to gameobjects

Constructors

this
this(Resource res, const(aiAnimation**) animations, int numAnimations, const(aiMesh*) mesh, const(aiNode*) nodeHierarchy)

Create the assetanimation, parsing all of the animation data

Members

Classes

Bone
class Bone

A bone in the animation, storing everything it needs

BonePose
class BonePose

All the bone transforms/rotations/scales for a sc

Functions

assignAnimationData
void assignAnimationData(const(aiAnimation*) animation, string boneName, BonePose poseToAssign)

Access the animation channels to find a match with the bone, then store its animation data

convertAIMatrix
mat4f convertAIMatrix(aiMatrix4x4 aiMatrix)

Converts an aiMatrix to a mat4

convertQuat
quatf[] convertQuat(const(aiQuatKey*) quaternions, int numKeys)

Converts a aiQuatKey[] to quat[].

convertVectorArray
vec3f[] convertVectorArray(const(aiVectorKey*) vectors, int numKeys)

* Converts a aiVectorKey[] to vec3f[].

fillTransforms
void fillTransforms(BonePose[] bonePoses, mat4f[] transforms, Bone bone, float time, mat4f parentTransform)

Recurse the bone hierarchy, filling up the bone transforms along the way

findBoneWithName
int findBoneWithName(string name, const(aiMesh*) mesh)

Get a bone number by matching name bones in mesh

getComponent
Animation getComponent()

Returns the animation as an addible component.

getTransformsAtTime
mat4f[] getTransformsAtTime(int animationNumber, float time)

Called by gameobject animation components to get an animation pose

makeBonesFromHierarchy
Bone makeBonesFromHierarchy(const(aiMesh*) mesh, const(aiNode*) currNode)

Recurse the node hierarchy, parsing it into a usable bone hierarchy

shutdown
void shutdown()

Shutdown the animation bone/pose data

Structs

AnimationSet
struct AnimationSet

A single animation track, storing its bones and poses

Meta