Skip to main content

RuntimeInstance

Struct RuntimeInstance 

Source
pub struct RuntimeInstance { /* private fields */ }

Implementations§

Source§

impl RuntimeInstance

Source

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.

Source

pub fn morph_weights(&self) -> &[f32]

Source§

impl RuntimeInstance

Source

pub fn physics_mode(&self) -> PhysicsMode

Source

pub fn set_physics_mode(&mut self, mode: PhysicsMode)

Source

pub fn physics_tick_config(&self) -> PhysicsTickConfig

Source

pub fn set_physics_tick_config(&mut self, config: PhysicsTickConfig)

Source

pub fn physics_accumulator_seconds(&self) -> f32

Source

pub fn reset_physics_tick(&mut self)

Source

pub fn apply_physics_world_matrices( &mut self, physics_world_matrices: &[Option<Mat4>], ) -> usize

Source

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.

Source

pub fn step_physics_with_ik_options( &mut self, dt_seconds: f32, options: IkSolveOptions, ) -> PhysicsStepStats

Source

pub fn advance_physics_tick_clock( &mut self, dt_seconds: f32, ) -> PhysicsStepStats

Source§

impl RuntimeInstance

Source

pub fn world_matrices(&self) -> &[Mat4]

Source

pub fn skinning_matrices(&self) -> &[Mat4]

Source§

impl RuntimeInstance

Source

pub fn new(model: Arc<ModelArena>) -> Self

Source

pub fn new_with_morph_count(model: Arc<ModelArena>, morph_count: usize) -> Self

Source

pub fn new_with_counts( model: Arc<ModelArena>, morph_count: usize, ik_count: usize, ) -> Self

Source

pub fn model(&self) -> &ModelArena

Source

pub fn pose(&self) -> &PoseArena

Source

pub fn pose_mut(&mut self) -> &mut PoseArena

Source

pub fn evaluate_current_pose(&mut self)

Source

pub fn evaluate_current_pose_with_ik_options(&mut self, options: IkSolveOptions)

Source

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.

Source

pub fn evaluate_current_pose_before_physics(&mut self)

Source

pub fn evaluate_current_pose_before_physics_with_ik_options( &mut self, options: IkSolveOptions, )

Source

pub fn evaluate_current_pose_after_physics(&mut self)

Source

pub fn evaluate_current_pose_after_physics_with_ik_options( &mut self, options: IkSolveOptions, )

Source

pub fn evaluate_rest_pose(&mut self)

Source

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.

Source

pub fn evaluate_clip_frame(&mut self, clip: &AnimationClip, frame: f32)

Source

pub fn evaluate_clip_frame_with_ik_options( &mut self, clip: &AnimationClip, frame: f32, options: IkSolveOptions, )

Source

pub fn evaluate_clip_frame_before_physics( &mut self, clip: &AnimationClip, frame: f32, )

Source

pub fn evaluate_clip_frame_before_physics_with_ik_options( &mut self, clip: &AnimationClip, frame: f32, options: IkSolveOptions, )

Source

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.

Source

pub fn reset_ik_runtime_stats(&mut self)

Source

pub fn ik_runtime_stats(&self) -> &[IkSolverRuntimeStats]

Source

pub fn append_position_offset(&self, bone: BoneIndex) -> Vec3A

Source

pub fn append_rotation(&self, bone: BoneIndex) -> Quat

Source

pub fn ik_enabled(&self) -> &[u8]

Trait Implementations§

Source§

impl Debug for RuntimeInstance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.