pub struct HandQuaternionFrame {Show 16 fields
pub wrist: Quaternion,
pub thumb_mcp: Quaternion,
pub thumb_pip: Quaternion,
pub thumb_dip: Quaternion,
pub index_mcp: Quaternion,
pub index_pip: Quaternion,
pub index_dip: Quaternion,
pub middle_mcp: Quaternion,
pub middle_pip: Quaternion,
pub middle_dip: Quaternion,
pub ring_mcp: Quaternion,
pub ring_pip: Quaternion,
pub ring_dip: Quaternion,
pub pinky_mcp: Quaternion,
pub pinky_pip: Quaternion,
pub pinky_dip: Quaternion,
}Expand description
Hand-joint orientations for one frame (16 joints).
Fields§
§wrist: Quaternion§thumb_mcp: Quaternion§thumb_pip: Quaternion§thumb_dip: Quaternion§index_mcp: Quaternion§index_pip: Quaternion§index_dip: Quaternion§middle_mcp: Quaternion§middle_pip: Quaternion§middle_dip: Quaternion§ring_mcp: Quaternion§ring_pip: Quaternion§ring_dip: Quaternion§pinky_mcp: Quaternion§pinky_pip: Quaternion§pinky_dip: QuaternionImplementations§
Source§impl HandQuaternionFrame
impl HandQuaternionFrame
Sourcepub const fn from_array(values: [Quaternion; 16]) -> Self
pub const fn from_array(values: [Quaternion; 16]) -> Self
Builds a frame from its values in wire order.
Useful for the Zendo server, which produces frames to encode rather than decoding them.
Sourcepub const fn to_array(&self) -> [Quaternion; 16]
pub const fn to_array(&self) -> [Quaternion; 16]
Returns the frame’s values in wire order.
Sourcepub const fn get(&self, key: HandJoint) -> Quaternion
pub const fn get(&self, key: HandJoint) -> Quaternion
Looks up a single value by name.
Sourcepub fn iter(&self) -> impl Iterator<Item = (HandJoint, Quaternion)>
pub fn iter(&self) -> impl Iterator<Item = (HandJoint, Quaternion)>
Iterates over (name, value) pairs in wire order.
Trait Implementations§
Source§impl Clone for HandQuaternionFrame
impl Clone for HandQuaternionFrame
Source§fn clone(&self) -> HandQuaternionFrame
fn clone(&self) -> HandQuaternionFrame
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 HandQuaternionFrame
Source§impl Debug for HandQuaternionFrame
impl Debug for HandQuaternionFrame
Source§impl Default for HandQuaternionFrame
impl Default for HandQuaternionFrame
Source§fn default() -> HandQuaternionFrame
fn default() -> HandQuaternionFrame
Returns the “default value” for a type. Read more
Source§impl PartialEq for HandQuaternionFrame
impl PartialEq for HandQuaternionFrame
Source§fn eq(&self, other: &HandQuaternionFrame) -> bool
fn eq(&self, other: &HandQuaternionFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HandQuaternionFrame
Auto Trait Implementations§
impl Freeze for HandQuaternionFrame
impl RefUnwindSafe for HandQuaternionFrame
impl Send for HandQuaternionFrame
impl Sync for HandQuaternionFrame
impl Unpin for HandQuaternionFrame
impl UnsafeUnpin for HandQuaternionFrame
impl UnwindSafe for HandQuaternionFrame
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