pub struct UnityTransform {
pub position: [f32; 3],
pub rotation: [f32; 4],
pub scale: [f32; 3],
}Expand description
The local transform of a Unity node, pre-converted to Unity’s left-handed coordinate system.
Regardless of whether the source glTF node used a matrix or TRS properties,
this always holds a decomposed TRS ready to hand to UnityEngine.Transform.
Fields§
§position: [f32; 3]Local position — X negated relative to glTF.
rotation: [f32; 4]Local rotation as a unit quaternion [x, y, z, w] — X and W negated relative to glTF.
scale: [f32; 3]Local scale — unchanged from glTF.
Trait Implementations§
Source§impl Default for UnityTransform
impl Default for UnityTransform
Source§fn default() -> UnityTransform
fn default() -> UnityTransform
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UnityTransform
impl RefUnwindSafe for UnityTransform
impl Send for UnityTransform
impl Sync for UnityTransform
impl Unpin for UnityTransform
impl UnsafeUnpin for UnityTransform
impl UnwindSafe for UnityTransform
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