Skeleton

Skeleton.

TODO documentation

Members

Functions

addBone
Bone* addBone(BoneType type, size_t parentIndex, Matrix matrix, Vector3 vector)
Bone* addBone(BoneType type, Bone* parent, Matrix matrix, Vector3 vector)
Bone* addBone(BoneType type, Matrix matrix, Vector3 vector)
Bone* addBone(BoneType type, size_t parentIndex)
Bone* addBone(BoneType type, Bone* parent)
Bone* addBone(BoneType type)

Add a bone from the given bone set.

drawBoneLines
void drawBoneLines(Matrix[] buffer)

Draw lines for each bone in the skeleton.

drawBoneLines
void drawBoneLines()

Draw lines for each bone in the skeleton.

drawBoneNormals
void drawBoneNormals(Matrix[] buffer)

Draw normals for each bone.

globalMatrices
void globalMatrices(Matrix[] matrices, void delegate(Matrix) @(safe) startCb)

Fill the given array with matrices each transforming a zero vector to the end of corresponding bones, relative to the model.

makeModel
IsodiModel makeModel(Texture2D texture, Texture2D matrixTexture)

Make a model out of the skeleton.

matrixImage
Image matrixImage()

Generate a matrix image for the skeleton.

matrixImageData
Vector4[4][] matrixImageData()
void matrixImageData(Vector4[4][] buffer)
void matrixImageData(Vector4[4][] buffer, Matrix[] matrices)

Generate a matrix image data for the skeleton.

Static functions

boneColor
Color boneColor(size_t i, float saturation, float value)

Get a representative color for the bone based on its index. Useful for debugging.

Variables

atlas
BoneUV[BoneType] atlas;

Mapping of bone types to their positions in the texture.

bones
Bone[] bones;

All bones in the skeleton.

properties
Properties properties;

Properties for the skeleton.

seed
ulong seed;

Seed to use to generate variants on the skeleton.

Meta