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)
Sourcepub fn apply_host_pose(
&mut self,
view: &HostPoseView<'_>,
) -> Result<(), HostPoseError>
pub fn apply_host_pose( &mut self, view: &HostPoseView<'_>, ) -> Result<(), HostPoseError>
Apply a complete host-owned pose and expand its morphs.
The supplied local offsets are the base pose. Group morph weights are expanded and bone-morph offsets are applied after all input validation and pose slices have been copied, matching clip evaluation semantics.
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.
pub fn reset_ik_runtime_stats(&mut self)
pub fn ik_runtime_stats(&self) -> &[IkSolverRuntimeStats]
pub fn append_position_offset(&self, bone: BoneIndex) -> Vec3A
pub fn append_rotation(&self, bone: BoneIndex) -> Quat
pub fn ik_enabled(&self) -> &[u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuntimeInstance
impl RefUnwindSafe for RuntimeInstance
impl Send for RuntimeInstance
impl Sync for RuntimeInstance
impl Unpin for RuntimeInstance
impl UnsafeUnpin for RuntimeInstance
impl UnwindSafe for RuntimeInstance
Blanket Implementations§
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
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