pub struct FaunaSkeletalRig10d {
pub archetype: FaunaBiomechanicalArchetype,
pub joint_count: usize,
pub joints: [Joint; 24],
pub parent_indices: [i32; 24],
pub rest_pose: [Motor; 24],
pub clip_poses: [[Motor; 24]; 5],
pub blend_space_2d: BlendSpace2D<16, 32>,
pub absm: AbsmMachine<4, 16, 32>,
pub prev_skin_motors: [Motor; 24],
pub current_skin_motors: [Motor; 24],
pub gpu_palette: [GpuJointMotorPair; 24],
pub signal_queue: SignalQueue<16>,
}Expand description
Complete 10D Articulated Fauna Skeletal Rig.
Encapsulates the PGA Motor joint hierarchy, 2D Bowyer–Watson Delaunay blend space, multi-layer ABSM, procedural motor oscillators, two-bone + FABRIK IK solvers, and GPU skinning palette / morph target evaluation buffers.
Fields§
§archetype: FaunaBiomechanicalArchetypeBiomechanical archetype.
joint_count: usizeActive joint count (<= FAUNA_MAX_JOINTS).
joints: [Joint; 24]Up to 24 skeletal joints with authored rest transforms and inverse-bind motors.
parent_indices: [i32; 24]Parent index lookup table (parent < 0 for root).
rest_pose: [Motor; 24]Authored rest pose in local space.
clip_poses: [[Motor; 24]; 5]5 cardinal clips for 2D blend space locomotion and state machine generation.
blend_space_2d: BlendSpace2D<16, 32>2D Bowyer-Watson Delaunay blend space parameterized by (forward_speed, turn_rate).
absm: AbsmMachine<4, 16, 32>Multi-layer zero-heap Animation Blending State Machine.
prev_skin_motors: [Motor; 24]Previous-frame skinning motors for exact TAA velocity vector evaluation.
current_skin_motors: [Motor; 24]Current-frame skinning motors.
gpu_palette: [GpuJointMotorPair; 24]64-byte GPU storage records (GpuJointMotorPair) ready for direct SSBO upload.
signal_queue: SignalQueue<16>Event ring buffer for timeline animation signals.
Implementations§
Source§impl FaunaSkeletalRig10d
impl FaunaSkeletalRig10d
Sourcepub fn new(archetype: FaunaBiomechanicalArchetype) -> Self
pub fn new(archetype: FaunaBiomechanicalArchetype) -> Self
Constructs a fully authored 10D fauna rig for the specified biomechanical archetype.
Sourcepub fn set_parameter(&mut self, idx: usize, param: AbsmParameter)
pub fn set_parameter(&mut self, idx: usize, param: AbsmParameter)
Sets an ABSM control parameter (e.g. idx 0: Vec2 [speed, turn], idx 1: Float speed, idx 2: Bool is_vocalizing).
Sourcepub fn sample_blend_space(
&self,
forward_speed_norm: f32,
turn_rate_rad: f32,
out_pose: &mut [Motor],
) -> Result<BlendSample2D, SkeletalError>
pub fn sample_blend_space( &self, forward_speed_norm: f32, turn_rate_rad: f32, out_pose: &mut [Motor], ) -> Result<BlendSample2D, SkeletalError>
Samples the 2D Bowyer–Watson Delaunay blend space at (forward_speed_norm, turn_rate_rad)
blending cardinal clip poses directly with Motor::sclerp (zero heap allocations).
Sourcepub fn step_absm(
&mut self,
dt: f32,
out_local_pose: &mut [Motor],
) -> Result<RootMotionDelta, SkeletalError>
pub fn step_absm( &mut self, dt: f32, out_local_pose: &mut [Motor], ) -> Result<RootMotionDelta, SkeletalError>
Advances the multi-layer ABSM by dt seconds, evaluating layer blending, EONT1
posture modulation, and root motion extraction while pushing crossed timeline signals
into self.signal_queue (HotZeroHeap).
Sourcepub fn apply_proc1_respiration_oscillation(
&self,
pose: &mut [Motor],
time_sec: f32,
amplitude_rad: f32,
)
pub fn apply_proc1_respiration_oscillation( &self, pose: &mut [Motor], time_sec: f32, amplitude_rad: f32, )
Applies procedural respiration breathing pitch oscillation onto the Chest and Spine joints.
Sourcepub fn apply_proc1_tail_undulation(
&self,
pose: &mut [Motor],
time_sec: f32,
frequency_hz: f32,
amplitude_rad: f32,
)
pub fn apply_proc1_tail_undulation( &self, pose: &mut [Motor], time_sec: f32, frequency_hz: f32, amplitude_rad: f32, )
Applies continuous procedural caudal (tail) undulation along the Tail Base, Mid, Tip, and Distal Tip joints.
Sourcepub fn solve_hindlimb_terrain_ik(
&self,
local_pose: &mut [Motor],
left_foot_target: [f32; 3],
right_foot_target: [f32; 3],
) -> Result<(TwoBoneIkResult, TwoBoneIkResult), SkeletalError>
pub fn solve_hindlimb_terrain_ik( &self, local_pose: &mut [Motor], left_foot_target: [f32; 3], right_foot_target: [f32; 3], ) -> Result<(TwoBoneIkResult, TwoBoneIkResult), SkeletalError>
Solves analytical Two-Bone Motor IK for both hindlimbs (Left and Right Hip-Knee-Ankle)
to adapt foot placement to sloped East Coast terrain elevations (HotZeroHeap).
Sourcepub fn solve_tail_fabrik_ik(
&self,
local_pose: &mut [Motor],
target_tip: [f32; 3],
) -> Result<f32, SkeletalError>
pub fn solve_tail_fabrik_ik( &self, local_pose: &mut [Motor], target_tip: [f32; 3], ) -> Result<f32, SkeletalError>
Solves Constrained Motor FABRIK on the articulated tail chain (Tail Base, Mid, Tip)
enforcing conical swing limits and hinge constraints (HotZeroHeap).
Sourcepub fn evaluate_gpu_palette(&mut self, local_pose: &[Motor]) -> usize
pub fn evaluate_gpu_palette(&mut self, local_pose: &[Motor]) -> usize
Evaluates the GPU dual-quaternion skinning palette into self.gpu_palette (GpuJointMotorPair),
computing $M_{\text{skin}} = M_{\text{world}} \circ M_{\text{inv_bind}}$ and updating previous-frame
motors for exact TAA velocity vector evaluation (HotZeroHeap).
Sourcepub fn compute_morph_weights(
&self,
explicit_weights: &[f32],
stage: u8,
damage_permill: u16,
hydration_permill: u16,
) -> GpuInstanceMorphWeights
pub fn compute_morph_weights( &self, explicit_weights: &[f32], stage: u8, damage_permill: u16, hydration_permill: u16, ) -> GpuInstanceMorphWeights
Computes 48-byte GpuInstanceMorphWeights combining explicit facial/vocal blend shape
weights with .10d EONT1 metabolic damage, hydration, and lifecycle growth factors (HotZeroHeap).
Sourcepub fn evaluate_morph_deltas(
&self,
base_positions: &[[f32; 3]],
base_normals: &[[f32; 3]],
morph_deltas: &[GpuMorphDelta],
weights: &GpuInstanceMorphWeights,
out_positions: &mut [[f32; 3]],
out_normals: &mut [[f32; 3]],
) -> Result<usize, SkeletalError>
pub fn evaluate_morph_deltas( &self, base_positions: &[[f32; 3]], base_normals: &[[f32; 3]], morph_deltas: &[GpuMorphDelta], weights: &GpuInstanceMorphWeights, out_positions: &mut [[f32; 3]], out_normals: &mut [[f32; 3]], ) -> Result<usize, SkeletalError>
Displaces authored bind-pose vertex positions and normals by pre-skinning GPU morph deltas (HotZeroHeap).
Sourcepub fn verify_vertex_skinning(
&self,
pos: [f32; 3],
normal: [f32; 3],
tangent: [f32; 4],
skin_attr: &GpuSkinnedVertex,
) -> ([f32; 3], [f32; 3], [f32; 4], [f32; 3])
pub fn verify_vertex_skinning( &self, pos: [f32; 3], normal: [f32; 3], tangent: [f32; 4], skin_attr: &GpuSkinnedVertex, ) -> ([f32; 3], [f32; 3], [f32; 4], [f32; 3])
Software reference execution of the GPU WGSL dual-quaternion skinning vertex shader,
returning (skinned_pos, skinned_normal, skinned_tangent, taa_motion_vector).
Sourcepub const fn pelvic_girdle_class(&self) -> PelvicGirdleClass
pub const fn pelvic_girdle_class(&self) -> PelvicGirdleClass
Returns the pelvic / structural girdle classification for this rig’s archetype.
Sourcepub fn joint_bio_metadata(&self) -> [JointBioMetadata; 24]
pub fn joint_bio_metadata(&self) -> [JointBioMetadata; 24]
Derives per-joint biomechanical & epistemic metadata across all 24 canonical joints.
Sourcepub fn to_skl2_payload(&self) -> SkeletalSectionPayload
pub fn to_skl2_payload(&self) -> SkeletalSectionPayload
Exports this rig’s active joints as a validated SKL2 v2 SkeletalSectionPayload.
Trait Implementations§
Source§impl Clone for FaunaSkeletalRig10d
impl Clone for FaunaSkeletalRig10d
impl Copy for FaunaSkeletalRig10d
Auto Trait Implementations§
impl Freeze for FaunaSkeletalRig10d
impl RefUnwindSafe for FaunaSkeletalRig10d
impl Send for FaunaSkeletalRig10d
impl Sync for FaunaSkeletalRig10d
impl Unpin for FaunaSkeletalRig10d
impl UnsafeUnpin for FaunaSkeletalRig10d
impl UnwindSafe for FaunaSkeletalRig10d
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more