pub struct RuntimeInstance { /* private fields */ }Implementations§
Source§impl RuntimeInstance
impl RuntimeInstance
Sourcepub fn expand_morphs(&mut self)
pub fn expand_morphs(&mut self)
Expand group morphs and apply bone morph offsets.
Called automatically from Self::evaluate_clip_frame. Exposed publicly so
that hosts manually driving crate::PoseArena can trigger morph expansion
before calling Self::evaluate_current_pose.
pub fn morph_weights(&self) -> &[f32]
Source§impl RuntimeInstance
impl RuntimeInstance
pub fn physics_mode(&self) -> PhysicsMode
pub fn set_physics_mode(&mut self, mode: PhysicsMode)
pub fn physics_tick_config(&self) -> PhysicsTickConfig
pub fn set_physics_tick_config(&mut self, config: PhysicsTickConfig)
pub fn physics_accumulator_seconds(&self) -> f32
pub fn reset_physics_tick(&mut self)
pub fn apply_physics_world_matrices( &mut self, physics_world_matrices: &[Option<Mat4>], ) -> usize
Sourcepub fn step_physics(&mut self, dt_seconds: f32) -> PhysicsStepStats
pub fn step_physics(&mut self, dt_seconds: f32) -> PhysicsStepStats
Advance the physics clock independently from animation sampling.
This is a no-backend implementation for now: it consumes fixed 120 Hz substeps and refreshes the after-physics evaluation phase, but does not simulate rigid bodies until a physics backend is attached.
pub fn step_physics_with_ik_options( &mut self, dt_seconds: f32, options: IkSolveOptions, ) -> PhysicsStepStats
pub fn advance_physics_tick_clock( &mut self, dt_seconds: f32, ) -> PhysicsStepStats
Source§impl RuntimeInstance
impl RuntimeInstance
pub fn world_matrices(&self) -> &[Mat4]
pub fn skinning_matrices(&self) -> &[Mat4]
Source§impl RuntimeInstance
impl RuntimeInstance
pub fn new(model: Arc<ModelArena>) -> Self
pub fn new_with_morph_count(model: Arc<ModelArena>, morph_count: usize) -> Self
pub fn new_with_counts( model: Arc<ModelArena>, morph_count: usize, ik_count: usize, ) -> Self
pub fn model(&self) -> &ModelArena
pub fn pose(&self) -> &PoseArena
pub fn pose_mut(&mut self) -> &mut PoseArena
pub fn evaluate_current_pose(&mut self)
pub fn evaluate_current_pose_with_ik_options(&mut self, options: IkSolveOptions)
Sourcepub fn evaluate_current_pose_without_ik(&mut self)
pub fn evaluate_current_pose_without_ik(&mut self)
Evaluate the current pose by updating world matrices only, without running any IK solver. This is useful for diagnostics that need to inspect clip/VMD state before IK is applied.
pub fn evaluate_current_pose_before_physics(&mut self)
pub fn evaluate_current_pose_before_physics_with_ik_options( &mut self, options: IkSolveOptions, )
pub fn evaluate_current_pose_after_physics(&mut self)
pub fn evaluate_current_pose_after_physics_with_ik_options( &mut self, options: IkSolveOptions, )
pub fn evaluate_rest_pose(&mut self)
pub fn evaluate_clip_frame(&mut self, clip: &AnimationClip, frame: f32)
pub fn evaluate_clip_frame_with_ik_options( &mut self, clip: &AnimationClip, frame: f32, options: IkSolveOptions, )
pub fn evaluate_clip_frame_before_physics( &mut self, clip: &AnimationClip, frame: f32, )
pub fn evaluate_clip_frame_before_physics_with_ik_options( &mut self, clip: &AnimationClip, frame: f32, options: IkSolveOptions, )
Sourcepub fn evaluate_clip_frame_without_ik(
&mut self,
clip: &AnimationClip,
frame: f32,
)
pub fn evaluate_clip_frame_without_ik( &mut self, clip: &AnimationClip, frame: f32, )
Evaluate a clip frame but stop before solving IK. Applies the clip to
the pose, expands morphs, and updates world matrices - the same setup
as Self::evaluate_clip_frame but without calling solve_enabled_ik.
Useful for diagnostics that need to inspect pre-IK runtime state.