pub struct Transform {
pub translation: [f32; 3],
pub rotation: [f32; 3],
pub scale: [f32; 2],
}Expand description
Local transform of a node. Applied relative to parent node.
Fields§
§translation: [f32; 3]Translation (x, y, z in pixels). z typically 0.0, used only for relative depth.
rotation: [f32; 3]Rotation (x, y, z in radians). Typically only z is used (2D rotation in XY plane).
scale: [f32; 2]Scale (sx, sy). 1.0 = original size, <1.0 = smaller, >1.0 = larger.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl UnwindSafe for Transform
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