pub struct LandmarkSet { /* private fields */ }Expand description
A collection of body landmarks with measurement helpers.
Implementations§
Source§impl LandmarkSet
impl LandmarkSet
Sourcepub fn get(&self, id: &LandmarkId) -> Option<&Landmark>
pub fn get(&self, id: &LandmarkId) -> Option<&Landmark>
Retrieve a landmark by id.
Sourcepub fn all_positions(&self) -> Vec<([f32; 3], f32)>
pub fn all_positions(&self) -> Vec<([f32; 3], f32)>
Returns all positions and their confidence values.
Sourcepub fn distance(&self, a: &LandmarkId, b: &LandmarkId) -> Option<f32>
pub fn distance(&self, a: &LandmarkId, b: &LandmarkId) -> Option<f32>
Euclidean distance between two landmarks, or None if either is missing.
Sourcepub fn body_height(&self) -> Option<f32>
pub fn body_height(&self) -> Option<f32>
Estimated body height from TopOfHead to HeelLeft (average of left/right if available).
Returns None if TopOfHead is absent.
Sourcepub fn shoulder_width(&self) -> Option<f32>
pub fn shoulder_width(&self) -> Option<f32>
Shoulder width from left acromion to right acromion.
Sourcepub fn arm_length(&self, side: Side) -> Option<f32>
pub fn arm_length(&self, side: Side) -> Option<f32>
Arm length for the given side: shoulder (acromion) to wrist.
Sourcepub fn leg_length(&self, side: Side) -> Option<f32>
pub fn leg_length(&self, side: Side) -> Option<f32>
Leg length for the given side: hip to ankle.
Sourcepub fn symmetry_error(&self) -> f32
pub fn symmetry_error(&self) -> f32
Maximum left-right asymmetry across all bilateral landmark pairs (in world units).
For each bilateral pair, computes the difference in X-axis distance from the
midline. Returns the maximum such difference; returns 0.0 if no bilateral
pairs are present.
Trait Implementations§
Source§impl Clone for LandmarkSet
impl Clone for LandmarkSet
Source§fn clone(&self) -> LandmarkSet
fn clone(&self) -> LandmarkSet
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 moreSource§impl Debug for LandmarkSet
impl Debug for LandmarkSet
Source§impl Default for LandmarkSet
impl Default for LandmarkSet
Source§fn default() -> LandmarkSet
fn default() -> LandmarkSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LandmarkSet
impl RefUnwindSafe for LandmarkSet
impl Send for LandmarkSet
impl Sync for LandmarkSet
impl Unpin for LandmarkSet
impl UnsafeUnpin for LandmarkSet
impl UnwindSafe for LandmarkSet
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