Struct skia_safe::M44

source ·
#[repr(C)]
pub struct M44 { /* private fields */ }

Implementations§

source§

impl M44

source

pub const fn new_identity() -> Self

source

pub fn concat(a: &Self, b: &Self) -> Self

source

pub const fn nan() -> Self

source

pub const fn new( m0: scalar, m4: scalar, m8: scalar, m12: scalar, m1: scalar, m5: scalar, m9: scalar, m13: scalar, m2: scalar, m6: scalar, m10: scalar, m14: scalar, m3: scalar, m7: scalar, m11: scalar, m15: scalar ) -> Self

source

pub fn rows(r0: &V4, r1: &V4, r2: &V4, r3: &V4) -> Self

source

pub fn cols(c0: &V4, c1: &V4, c2: &V4, c3: &V4) -> Self

source

pub fn row_major(r: &[scalar; 16]) -> Self

source

pub fn col_major(c: &[scalar; 16]) -> Self

source

pub fn translate(x: scalar, y: scalar, z: scalar) -> Self

source

pub fn scale(x: scalar, y: scalar, z: scalar) -> Self

source

pub fn rotate(axis: V3, radians: scalar) -> Self

source

pub fn rect_to_rect(src: impl AsRef<Rect>, dst: impl AsRef<Rect>) -> Self

source

pub fn look_at(eye: &V3, center: &V3, up: &V3) -> Self

source

pub fn perspective(near: f32, far: f32, angle: f32) -> Self

source

pub fn get_col_major(&self, v: &mut [scalar; 16])

source

pub fn get_row_major(&self, v: &mut [scalar; 16])

source

pub fn set_col_major(&mut self, v: &[scalar; 16]) -> &mut Self

👎Deprecated since 0.30.0: use M44::col_major() instead
source

pub fn set_row_major(&mut self, v: &[scalar; 16]) -> &mut Self

👎Deprecated since 0.30.0: use M44::row_major() instead
source

pub fn set_44( &mut self, m0: scalar, m1: scalar, m2: scalar, m3: scalar, m4: scalar, m5: scalar, m6: scalar, m7: scalar, m8: scalar, m9: scalar, m10: scalar, m11: scalar, m12: scalar, m13: scalar, m14: scalar, m15: scalar ) -> &mut Self

👎Deprecated since 0.30.0: use Self::new() instead
source

pub fn rc(&self, r: usize, c: usize) -> scalar

source

pub fn set_rc(&mut self, r: usize, c: usize, value: scalar)

source

pub fn row(&self, i: usize) -> V4

source

pub fn col(&self, i: usize) -> V4

source

pub fn set_row(&mut self, i: usize, v: &V4)

source

pub fn set_col(&mut self, i: usize, v: &V4)

source

pub fn set_identity(&mut self) -> &mut Self

source

pub fn set_translate(&mut self, x: scalar, y: scalar, z: scalar) -> &mut Self

source

pub fn set_scale(&mut self, x: scalar, y: scalar, z: scalar) -> &mut Self

source

pub fn set_rotate_unit_sin_cos( &mut self, axis: V3, sin_angle: scalar, cos_angle: scalar ) -> &mut Self

source

pub fn set_rotate_unit(&mut self, axis: V3, radians: scalar) -> &mut Self

source

pub fn set_rotate(&mut self, axis: V3, radians: scalar) -> &mut Self

source

pub fn set_concat_16(&mut self, a: &M44, col_major: &[scalar; 16]) -> &mut Self

👎Deprecated since 0.30.0: use M44::col_major() and M44::set_concat()
source

pub fn set_concat(&mut self, a: &M44, b: &M44) -> &mut Self

source

pub fn pre_concat_16(&mut self, col_major: &[scalar; 16]) -> &mut Self

👎Deprecated since 0.30.0: use M44::col_major() and M44::pre_concat()
source

pub fn pre_concat(&mut self, m: &M44) -> &mut Self

source

pub fn post_concat(&mut self, m: &M44) -> &mut Self

source

pub fn normalize_perspective(&mut self)

source

pub fn is_finite(&self) -> bool

source

pub fn invert(&self) -> Option<M44>

source

pub fn transpose(&self) -> Self

source

pub fn dump(&self)

source

pub fn map(&self, x: f32, y: f32, z: f32, w: f32) -> V4

source

pub fn to_m33(&self) -> Matrix

source

pub fn pre_translate( &mut self, x: scalar, y: scalar, z: impl Into<Option<scalar>> ) -> &mut Self

source

pub fn post_translate( &mut self, x: scalar, y: scalar, z: impl Into<Option<scalar>> ) -> &mut Self

source

pub fn pre_scale(&mut self, x: scalar, y: scalar) -> &mut Self

source

pub fn pre_scale_xyz(&mut self, x: scalar, y: scalar, z: scalar) -> &mut Self

Trait Implementations§

source§

impl Clone for M44

source§

fn clone(&self) -> M44

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for M44

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for M44

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<&Matrix> for M44

source§

fn from(src: &Matrix) -> Self

Converts to this type from the input type.
source§

impl From<Matrix> for M44

source§

fn from(m: Matrix) -> Self

Converts to this type from the input type.
source§

impl Mul<&M44> for &M44

§

type Output = M44

The resulting type after applying the * operator.
source§

fn mul(self, m: Self) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<V3> for &M44

§

type Output = V3

The resulting type after applying the * operator.
source§

fn mul(self, v: V3) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<V4> for &M44

§

type Output = V4

The resulting type after applying the * operator.
source§

fn mul(self, v: V4) -> Self::Output

Performs the * operation. Read more
source§

impl PartialEq<M44> for M44

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl RefUnwindSafe for M44

§

impl Send for M44

§

impl Sync for M44

§

impl Unpin for M44

§

impl UnwindSafe for M44

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<N, T> NativeTransmutableWrapper<N> for Twhere T: NativeTransmutable<N>,

source§

fn wrap(native: N) -> T

source§

fn unwrap(self) -> N

source§

fn inner(&self) -> &N

source§

fn inner_mut(&mut self) -> &mut N

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.