#[repr(C)]pub struct HandJoint {
pub position: Vec3,
pub orientation: Quat,
pub radius: f32,
}
Expand description
Contains information to represents a joint on the hand. https://stereokit.net/Pages/StereoKit/HandJoint.html
see also Input::hand
Hand::get
FingerId
JointId
§Examples
use stereokit_rust::{system::{Input, Handed, FingerId, JointId},
maths::{Vec3, Quat, Pose, Ray}};
let hand = Input::hand(Handed::Left);
let index_root = hand.get(FingerId::Index, JointId::Root);
assert_eq!(index_root.position, Vec3 { x: -0.011, y: -0.038, z: 0.004 });
let hand = Input::hand(Handed::Right);
let index_root = hand.get(FingerId::Index, JointId::Root);
assert_eq!(index_root.position, Vec3 { x: 0.011, y: -0.038, z: 0.004 });
let index_tip = hand.get(FingerId::Index, JointId::Tip);
assert_eq!(index_tip.position, Vec3 { x: 0.029, y: 0.097, z: -0.041 });
assert_eq!(index_tip.orientation, Quat { x: -0.193, y: -0.004, z: 0.046, w: -0.98 });
assert_eq!(index_tip.radius, 0.007);
Fields§
§position: Vec3
The center of the joint’s world space location.
orientation: Quat
The joint’s world space orientation, where Forward points to the next joint down the finger, and Up will point towards the back of the hand. On the left hand, Right will point towards the thumb, and on the right hand, Right will point away from the thumb.
radius: f32
The distance, in meters, to the surface of the hand from this joint.
Trait Implementations§
impl Copy for HandJoint
impl StructuralPartialEq for HandJoint
Auto Trait Implementations§
impl Freeze for HandJoint
impl RefUnwindSafe for HandJoint
impl Send for HandJoint
impl Sync for HandJoint
impl Unpin for HandJoint
impl UnwindSafe for HandJoint
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.