simvx.core.skeleton¶
Skeleton and bone hierarchy for skeletal animation.
Module Contents¶
Classes¶
Data¶
API¶
- simvx.core.skeleton.log¶
‘getLogger(…)’
- simvx.core.skeleton.__all__¶
[‘Bone’, ‘Skeleton’]
- class simvx.core.skeleton.Bone¶
Single bone in a skeleton hierarchy.
- name: str = <Multiline-String>¶
- parent_index: int¶
None
- inverse_bind_matrix: numpy.ndarray¶
‘field(…)’
- local_transform: numpy.ndarray¶
‘field(…)’
- class simvx.core.skeleton.Skeleton(bones: list[simvx.core.skeleton.Bone] | None = None)¶
Bone hierarchy with GPU-ready joint matrix computation.
Joint matrices = parent_world * local_transform * inverse_bind_matrix These are uploaded to an SSBO for vertex skinning in the shader.
Initialization
- property bone_count: int¶
- property joint_matrices: numpy.ndarray¶
Get computed joint matrices (bone_count, 4, 4). Call compute_pose() first.
- compute_pose(bone_transforms: dict[int, numpy.ndarray] | None = None) None¶
Compute final joint matrices from bone-local transforms.
Args: bone_transforms: Optional override for bone-local transforms. Maps bone_index → 4x4 local transform matrix. Bones not in this dict use their default local_transform.
- find_bone(name: str) int¶
Find bone index by name. Returns -1 if not found.