Struct RootMotionExtractor
pub struct RootMotionExtractor {
pub root_joint_index: usize,
pub lock_horizontal: bool,
pub lock_vertical: bool,
pub prev_root_motor: Motor,
pub loop_start_motor: Motor,
pub loop_end_motor: Motor,
pub initialized: bool,
}Expand description
Extracts continuous root motion from the root bone (eliminating loop-wrap teleport spikes)
and locks horizontal (x, z) drift on the visual skeleton.
Fields§
§root_joint_index: usize§lock_horizontal: bool§lock_vertical: bool§prev_root_motor: Motor§loop_start_motor: Motor§loop_end_motor: Motor§initialized: boolImplementations§
§impl RootMotionExtractor
impl RootMotionExtractor
pub const fn new(
root_joint_index: usize,
loop_start_motor: Motor,
loop_end_motor: Motor,
) -> RootMotionExtractor
pub const fn new( root_joint_index: usize, loop_start_motor: Motor, loop_end_motor: Motor, ) -> RootMotionExtractor
Creates a root motion extractor for root_joint_index with authored clip seam poses.
pub fn extract_and_lock(
&mut self,
local_pose: &mut [Motor],
looped_this_frame: bool,
) -> RootMotionDelta
pub fn extract_and_lock( &mut self, local_pose: &mut [Motor], looped_this_frame: bool, ) -> RootMotionDelta
Extracts the frame’s RootMotionDelta from local_pose[self.root_joint_index]
and zeroes out horizontal (x, z) root bone drift in-place (HotZeroHeap).
Trait Implementations§
§impl Clone for RootMotionExtractor
impl Clone for RootMotionExtractor
§fn clone(&self) -> RootMotionExtractor
fn clone(&self) -> RootMotionExtractor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RootMotionExtractor
§impl Debug for RootMotionExtractor
impl Debug for RootMotionExtractor
§impl Default for RootMotionExtractor
impl Default for RootMotionExtractor
§fn default() -> RootMotionExtractor
fn default() -> RootMotionExtractor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RootMotionExtractor
impl RefUnwindSafe for RootMotionExtractor
impl Send for RootMotionExtractor
impl Sync for RootMotionExtractor
impl Unpin for RootMotionExtractor
impl UnsafeUnpin for RootMotionExtractor
impl UnwindSafe for RootMotionExtractor
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>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.