pub struct PoseRetargetConfig {
pub source_height: f64,
pub target_height: f64,
pub scale_mode: ScaleMode,
}Expand description
Configuration for a retargeting operation.
Fields§
§source_height: f64Body height (cm) of the source body the pose was captured on.
target_height: f64Body height (cm) of the target body to retarget to.
scale_mode: ScaleModeHow joint translations are scaled.
Implementations§
Source§impl RetargetConfig
impl RetargetConfig
Sourcepub fn proportional(source_height: f64, target_height: f64) -> Self
pub fn proportional(source_height: f64, target_height: f64) -> Self
Convenience constructor with ScaleMode::Proportional.
Sourcepub fn global_scale(&self) -> f64
pub fn global_scale(&self) -> f64
Return the global height scale factor target / source.
Returns 1.0 if source_height is zero to avoid division by zero.
Trait Implementations§
Source§impl Clone for RetargetConfig
impl Clone for RetargetConfig
Source§fn clone(&self) -> RetargetConfig
fn clone(&self) -> RetargetConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RetargetConfig
impl RefUnwindSafe for RetargetConfig
impl Send for RetargetConfig
impl Sync for RetargetConfig
impl Unpin for RetargetConfig
impl UnsafeUnpin for RetargetConfig
impl UnwindSafe for RetargetConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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