Type Alias style::values::computed::transform::Matrix3D

source ·
pub type Matrix3D = Matrix3D<Number>;
Expand description

computed value of matrix3d()

Aliased Type§

struct Matrix3D {
Show 16 fields pub m11: f32, pub m12: f32, pub m13: f32, pub m14: f32, pub m21: f32, pub m22: f32, pub m23: f32, pub m24: f32, pub m31: f32, pub m32: f32, pub m33: f32, pub m34: f32, pub m41: f32, pub m42: f32, pub m43: f32, pub m44: f32,
}

Fields§

§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

Implementations§

source§

impl Matrix3D

source

pub fn identity() -> Self

Get an identity matrix

source

pub fn into_2d(self) -> Result<Matrix, ()>

Convert to a 2D Matrix

source

pub fn is_3d(&self) -> bool

Return true if this has 3D components.

source

pub fn determinant(&self) -> CSSFloat

Return determinant value.

source

pub fn transpose(&self) -> Self

Transpose a matrix.

source

pub fn inverse(&self) -> Result<Matrix3D, ()>

Return inverse matrix.

source

pub fn pre_mul_point4(&self, pin: &[f32; 4]) -> [f32; 4]

Multiply pin * self.

source

pub fn multiply(&self, other: &Self) -> Self

Return the multiplication of two 4x4 matrices.

source

pub fn scale_by_factor(&mut self, scaling_factor: CSSFloat)

Scale the matrix by a factor.

source

pub fn get_matrix_3x3_part(&self) -> [[f32; 3]; 3]

Return the matrix 3x3 part (top-left corner). This is used by retrieving the scale and shear factors during decomposing a 3d matrix.

source

pub fn set_perspective(&mut self, perspective: &Perspective)

Set perspective on the matrix.

source

pub fn apply_translate(&mut self, translate: &Translate3D)

Apply translate on the matrix.

source

pub fn apply_scale(&mut self, scale: &Scale3D)

Apply scale on the matrix.

Trait Implementations§

source§

impl Animate for Matrix3D

source§

fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>

Animate a value towards another one, given an animation procedure.
source§

impl<T: Clone> Clone for GenericMatrix3D<T>

source§

fn clone(&self) -> GenericMatrix3D<T>

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 ComputeSquaredDistance for Matrix3D

source§

fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>

Computes the squared distance between two animatable values.
source§

impl<T: Debug> Debug for GenericMatrix3D<T>

source§

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

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

impl<'de, T> Deserialize<'de> for GenericMatrix3D<T>where T: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<GenericMatrix<f32>> for Matrix3D

source§

fn from(m: Matrix) -> Self

Converts to this type from the input type.
source§

impl From<MatrixDecomposed2D> for Matrix3D

source§

impl From<MatrixDecomposed3D> for Matrix3D

source§

impl From<Transform3D<f32, UnknownUnit, UnknownUnit>> for Matrix3D

source§

fn from(m: Transform3D<CSSFloat>) -> Self

Converts to this type from the input type.
source§

impl<T> MallocSizeOf for GenericMatrix3D<T>where T: MallocSizeOf,

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
source§

impl<T: PartialEq> PartialEq<GenericMatrix3D<T>> for GenericMatrix3D<T>

source§

fn eq(&self, other: &GenericMatrix3D<T>) -> 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.
source§

impl<T> Serialize for GenericMatrix3D<T>where T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T> SpecifiedValueInfo for GenericMatrix3D<T>

source§

const SUPPORTED_TYPES: u8 = 0u8

Supported CssTypes by the given value type. Read more
source§

fn collect_completion_keywords(_f: &mut dyn FnMut(&[&'static str]))

Collect value starting words for the given specified value type. This includes keyword and function names which can appear at the beginning of a value of this type. Read more
source§

impl<T> ToComputedValue for GenericMatrix3D<T>where T: ToComputedValue,

§

type ComputedValue = GenericMatrix3D<<T as ToComputedValue>::ComputedValue>

The computed value type we’re going to be converted to.
source§

fn from_computed_value(from: &Self::ComputedValue) -> Self

Convert a computed value to specified value form. Read more
source§

fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue

Convert a specified value to a computed value, using itself and the data inside the Context.
source§

impl<T> ToCss for GenericMatrix3D<T>where T: ToCss,

source§

fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere W: Write,

Serialize self in CSS syntax, writing to dest.
source§

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more
source§

impl<T> ToResolvedValue for GenericMatrix3D<T>where T: ToResolvedValue,

§

type ResolvedValue = GenericMatrix3D<<T as ToResolvedValue>::ResolvedValue>

The resolved value type we’re going to be converted to.
source§

fn from_resolved_value(from: Self::ResolvedValue) -> Self

Convert a resolved value to resolved value form.
source§

fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue

Convert a resolved value to a resolved value.
source§

impl<T> ToShmem for GenericMatrix3D<T>where T: ToShmem,

source§

fn to_shmem(&self, builder: &mut SharedMemoryBuilder) -> Result<Self>

Clones this value into a form suitable for writing into a SharedMemoryBuilder. Read more
source§

impl<T: Copy> Copy for GenericMatrix3D<T>

source§

impl<T> StructuralPartialEq for GenericMatrix3D<T>