#[non_exhaustive]pub struct Edge {
pub kind: EdgeKind,
pub input_rot_g: Option<Global<UnitQuat>>,
pub calib_rot_l: Local<UnitQuat>,
pub length: f32,
pub output_rot_g: Global<UnitQuat>,
}
Expand description
Edge
s represent the connections between the Node
s of the
skeleton.
Edges have a global rotation, represented as a unit quaternion. To
get an edge’s position, you can get the position of either of its two attached
Node
s.
Note that by convention, the directionality of edges points towards the top of the skeleton. So the head of the edge would also be the tail of an edge closer to the top of the skeleton. This is simply to give the parent and child of an edge a consistent meaning.
For more information, see the skeleton
module.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: EdgeKind
input_rot_g: Option<Global<UnitQuat>>
Input rotation in global space. If it is unconstrained, it is None
.
calib_rot_l: Local<UnitQuat>
Local rotation of the edge with respect to the parent edge at calibration time. Maps from parent frame to child frame.
length: f32
Length of the edge. May be set by the user, or may be computed at calibration.
output_rot_g: Global<UnitQuat>
The output rotation of the edge. Solving the skeleton updates this.
Implementations
Auto Trait Implementations
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.