Header menu logo Mibo

AnimatedMesh Module

Functions and values

Function or value Description

computeBoneMatrices clip frame mesh

Full Usage: computeBoneMatrices clip frame mesh

Parameters:
Returns: Matrix[]

Compute bone matrices for a given animation clip and frame.

This is pure math — does not mutate the model. The result can be passed directly to Draw3D.drawSkinnedMesh for GPU skinning. The algorithm matches raylib's UpdateModelAnimation: interpolates keyframes (lerp), builds TRS matrices (already merged into keyframes), and multiplies by the inverse bind pose. NOTE: this is the legacy single-frame path with NO parent-chain composition — channelless bones fall back to their raw inverse-bind (lines below), which is correct only for clips that animate every bone in isolation. The animated-model draw path uses computeBonePalette instead (which composes parents AND falls back to the bind local pose), so this path is retained for API completeness but is not exercised by the forward pipeline.

clip : Animation3DClip
frame : float32
mesh : AnimatedMesh
Returns: Matrix[]

fromScene scene

Full Usage: fromScene scene

Parameters:
Returns: AnimatedMesh voption

Extract an AnimatedMesh from an Assimp Scene.

Reads bone names and inverse-bind (offset) matrices from the first mesh that has bones. Returns ValueNone if no mesh has bones.

scene : Scene
Returns: AnimatedMesh voption

Type something to start searching.