pub enum Rest {
Affine(Transform),
Trs {
translation: [f32; 3],
rotation: [f32; 4],
scale: [f32; 3],
},
}Expand description
A joint’s rest transform in its parent’s space (the skeleton’s, for a root): parent = M * local. One form is the
authority, as the source states it.
Variants§
Affine(Transform)
Any affine map (a source storing a matrix).
Trs
Translation, rotation, scale, applied scale first: M = T * R * S (glTF’s node order). rotation is a unit
quaternion [x, y, z, w].
Implementations§
Source§impl Rest
impl Rest
Sourcepub fn matrix(&self) -> Transform
pub fn matrix(&self) -> Transform
The map as an affine transform: a Rest::Trs composed in f64 and rounded once per entry.
Sourcepub fn converted(&self, frame: &SourceFrame) -> Rest
pub fn converted(&self, frame: &SourceFrame) -> Rest
The rest with both its sides converted from frame into the world’s (C M C^-1, SourceFrame::transform).
Exact: a frame is a signed permutation of the axes with a unit scale. A rotation conjugated by a signed
permutation C stays a rotation whose quaternion is (det(C) C v, w); a scale’s axes are permuted, the frame’s
signs cancelling (C diag(s) C^-1) and the scale’s own kept (a mirrored joint stays mirrored); a translation
converts as a point.