#[repr(C)]pub struct ComputedTransform3D {
pub m: [[f32; 4]; 4],
}Expand description
Computed transform of pixels in pixel space
NOTE: Matrix is row-major, not column-major
Fields§
§m: [[f32; 4]; 4]Implementations§
Source§impl ComputedTransform3D
impl ComputedTransform3D
pub const IDENTITY: Self
pub const fn new( m11: f32, m12: f32, m13: f32, m14: f32, m21: f32, m22: f32, m23: f32, m24: f32, m31: f32, m32: f32, m33: f32, m34: f32, m41: f32, m42: f32, m43: f32, m44: f32, ) -> Self
pub const fn new_2d( m11: f32, m12: f32, m21: f32, m22: f32, m41: f32, m42: f32, ) -> Self
pub fn inverse(&self) -> Self
pub fn from_style_transform_vec( t_vec: &[StyleTransform], transform_origin: &StyleTransformOrigin, percent_resolve_x: f32, percent_resolve_y: f32, rotation_mode: RotationMode, ) -> Self
Sourcepub fn from_style_transform(
t: &StyleTransform,
transform_origin: &StyleTransformOrigin,
percent_resolve_x: f32,
percent_resolve_y: f32,
rotation_mode: RotationMode,
) -> Self
pub fn from_style_transform( t: &StyleTransform, transform_origin: &StyleTransformOrigin, percent_resolve_x: f32, percent_resolve_y: f32, rotation_mode: RotationMode, ) -> Self
Creates a new transform from a style transform using the parent width as a way to resolve for percentages
pub const fn new_scale(x: f32, y: f32, z: f32) -> Self
pub const fn new_translation(x: f32, y: f32, z: f32) -> Self
pub fn new_perspective(d: f32) -> Self
Sourcepub fn new_rotation(x: f32, y: f32, z: f32, theta_radians: f32) -> Self
pub fn new_rotation(x: f32, y: f32, z: f32, theta_radians: f32) -> Self
Create a 3d rotation transform from an angle / axis. The supplied axis must be normalized.
pub fn new_skew(alpha: f32, beta: f32) -> Self
pub fn get_column_major(&self) -> Self
pub fn transform_point2d(&self, p: LogicalPosition) -> Option<LogicalPosition>
pub fn scale_for_dpi(&mut self, scale_factor: f32)
Sourcepub fn then(&self, other: &Self) -> Self
pub fn then(&self, other: &Self) -> Self
Computes the sum of two matrices while applying other AFTER the current matrix.
pub unsafe fn then_sse(&self, other: &Self) -> Self
pub unsafe fn linear_combine_avx8( a01: __m256, b: &ComputedTransform3D, ) -> __m256
pub unsafe fn then_avx8(&self, other: &Self) -> Self
pub fn make_rotation( rotation_origin: (f32, f32), degrees: f32, axis_x: f32, axis_y: f32, axis_z: f32, rotation_mode: RotationMode, ) -> Self
Trait Implementations§
Source§impl Clone for ComputedTransform3D
impl Clone for ComputedTransform3D
Source§fn clone(&self) -> ComputedTransform3D
fn clone(&self) -> ComputedTransform3D
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputedTransform3D
impl Debug for ComputedTransform3D
Source§impl PartialEq for ComputedTransform3D
impl PartialEq for ComputedTransform3D
Source§impl PartialOrd for ComputedTransform3D
impl PartialOrd for ComputedTransform3D
impl Copy for ComputedTransform3D
impl StructuralPartialEq for ComputedTransform3D
Auto Trait Implementations§
impl Freeze for ComputedTransform3D
impl RefUnwindSafe for ComputedTransform3D
impl Send for ComputedTransform3D
impl Sync for ComputedTransform3D
impl Unpin for ComputedTransform3D
impl UnwindSafe for ComputedTransform3D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more