pub struct TransformNode {
pub translate: [f32; 2],
pub rotate: f32,
pub scale: [f32; 2],
}Expand description
Apply a 2D affine transform (translate, rotate, scale) to a texture.
Pixels that fall outside the [0, 1] UV range after the inverse transform are rendered as fully transparent.
The CPU path is a no-op (passthrough); use the GPU path for actual transformation.
Fields§
§translate: [f32; 2]UV-space translation (positive = shift right/down).
rotate: f32Counter-clockwise rotation in radians.
scale: [f32; 2]Scale factors (1.0 = no change; > 1.0 = zoom in).
Implementations§
Trait Implementations§
Source§impl Default for TransformNode
impl Default for TransformNode
Source§impl RenderNodeCpu for TransformNode
impl RenderNodeCpu for TransformNode
Auto Trait Implementations§
impl Freeze for TransformNode
impl RefUnwindSafe for TransformNode
impl Send for TransformNode
impl Sync for TransformNode
impl Unpin for TransformNode
impl UnsafeUnpin for TransformNode
impl UnwindSafe for TransformNode
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