Enum gltf::scene::Transform [−][src]
pub enum Transform {
Matrix {
matrix: [[f32; 4]; 4],
},
Decomposed {
translation: [f32; 3],
rotation: [f32; 4],
scale: [f32; 3],
},
}The transform for a Node.
Variants
Matrix4x4 transformation matrix in column-major order.
Fields of Matrix
matrix: [[f32; 4]; 4] | 4x4 matrix. |
DecomposedDecomposed TRS properties.
Fields of Decomposed
translation: [f32; 3] |
|
rotation: [f32; 4] |
|
scale: [f32; 3] |
|
Methods
impl Transform[src]
impl Transformpub fn matrix(self) -> [[f32; 4]; 4][src]
pub fn matrix(self) -> [[f32; 4]; 4]Returns the matrix representation of this transform.
If the transform is Decomposed, then the matrix is generated with the
equation matrix = translation * rotation * scale.
pub fn decomposed(self) -> ([f32; 3], [f32; 4], [f32; 3])[src]
pub fn decomposed(self) -> ([f32; 3], [f32; 4], [f32; 3])Returns a decomposed representation of this transform.
If the transform is Matrix, then the decomposition is extracted from the
matrix.
Trait Implementations
impl Clone for Transform[src]
impl Clone for Transformfn clone(&self) -> Transform[src]
fn clone(&self) -> TransformReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for Transform[src]
impl Debug for Transform