### Overview Add a skeleton data structure representing a hierarchy of bones for skeletal animation. ### Current State _No response_ ### Scope **Goals:** - Bone structure with parent references - Local and world transform per bone - Bind pose (rest pose) storage - Pose application **Non-Goals:** - Animation playback - Skinning/mesh deformation - IK ### Proposed API impl Skeleton { pub fn new(bones: Vec<Bone>) -> Self; pub fn bone_count(&self) -> usize; pub fn bone(&self, index: usize) -> &Bone; pub fn find_bone(&self, name: &str) -> Option<usize>; pub fn parent(&self, index: usize) -> Option<usize>; } pub struct Pose { local_transforms: Vec<Transform>, world_matrices: Vec<[[f32; 4]; 4]>, } impl Pose { pub fn from_skeleton(skeleton: &Skeleton) -> Self; pub fn set_local(&mut self, bone: usize, transform: Transform); pub fn compute_world_matrices(&mut self, skeleton: &Skeleton); pub fn skin_matrices(&self, skeleton: &Skeleton) -> Vec<[[f32; 4]; 4]>; } ``` ### Acceptance Criteria - [ ] Skeleton stores bone hierarchy - [ ] Bones reference parents by index - [ ] Pose stores per-bone transforms - [ ] World matrices computed from hierarchy - [ ] Skin matrices combine world and inverse bind ### Affected Crates lambda-rs ### Notes - Inverse bind = inverse of bind pose world matrix - Skin matrix = world * inverse_bind
Activity