pub struct JointOffset {
pub translation: [f32; 3],
pub rotation: [f32; 4],
}Expand description
Where a target joint stands inside the source mesh, as an offset from where a fit would put it: the target joint’s
frame (its rest, carried into the source’s model space) is moved by translation (metres, along the source’s model
axes) and turned by rotation (a unit quaternion [x, y, z, w], about the joint’s own origin, in the source’s
model axes). The identity offset (zero, [0, 0, 0, 1]) is the fit’s own placement.
Fields§
§translation: [f32; 3]§rotation: [f32; 4]Implementations§
Source§impl JointOffset
impl JointOffset
Sourcepub const IDENTITY: JointOffset
pub const IDENTITY: JointOffset
The offset that moves nothing.
Sourcepub const UNIT_TOLERANCE: f32 = 1e-3
pub const UNIT_TOLERANCE: f32 = 1e-3
How far a rotation’s length may be from 1 and still be a unit quaternion.
Sourcepub fn check(&self) -> Result<(), String>
pub fn check(&self) -> Result<(), String>
Finite entries and a rotation of unit length (within Self::UNIT_TOLERANCE).
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Whether this is the identity offset (the fit’s own placement).
Trait Implementations§
Source§impl Clone for JointOffset
impl Clone for JointOffset
impl Copy for JointOffset
Source§impl Debug for JointOffset
impl Debug for JointOffset
Source§impl PartialEq for JointOffset
impl PartialEq for JointOffset
Source§impl Serialize for JointOffset
impl Serialize for JointOffset
impl StructuralPartialEq for JointOffset
Auto Trait Implementations§
impl Forget for JointOffset
impl Freeze for JointOffset
impl RefUnwindSafe for JointOffset
impl Send for JointOffset
impl Sync for JointOffset
impl Unpin for JointOffset
impl UnsafeUnpin for JointOffset
impl UnwindSafe for JointOffset
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