pub type Matrix3D = Matrix3D<Number>;
Expand description
computed value of matrix3d()
Aliased Type§
struct Matrix3D {}
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
impl Matrix3D
sourcepub fn determinant(&self) -> CSSFloat
pub fn determinant(&self) -> CSSFloat
Return determinant value.
sourcepub fn scale_by_factor(&mut self, scaling_factor: CSSFloat)
pub fn scale_by_factor(&mut self, scaling_factor: CSSFloat)
Scale the matrix by a factor.
sourcepub fn get_matrix_3x3_part(&self) -> [[f32; 3]; 3]
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.
sourcepub fn set_perspective(&mut self, perspective: &Perspective)
pub fn set_perspective(&mut self, perspective: &Perspective)
Set perspective on the matrix.
sourcepub fn apply_translate(&mut self, translate: &Translate3D)
pub fn apply_translate(&mut self, translate: &Translate3D)
Apply translate on the matrix.
sourcepub fn apply_scale(&mut self, scale: &Scale3D)
pub fn apply_scale(&mut self, scale: &Scale3D)
Apply scale on the matrix.
Trait Implementations§
source§impl<T: Clone> Clone for GenericMatrix3D<T>
impl<T: Clone> Clone for GenericMatrix3D<T>
source§fn clone(&self) -> GenericMatrix3D<T>
fn clone(&self) -> GenericMatrix3D<T>
Returns a copy 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 ComputeSquaredDistance for Matrix3D
impl ComputeSquaredDistance for Matrix3D
source§fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>
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>
impl<T: Debug> Debug for GenericMatrix3D<T>
source§impl<'de, T> Deserialize<'de> for GenericMatrix3D<T>where
T: Deserialize<'de>,
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>,
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<MatrixDecomposed2D> for Matrix3D
impl From<MatrixDecomposed2D> for Matrix3D
source§fn from(decomposed: MatrixDecomposed2D) -> Matrix3D
fn from(decomposed: MatrixDecomposed2D) -> Matrix3D
Recompose a 2D matrix. https://drafts.csswg.org/css-transforms/#recomposing-to-a-2d-matrix
source§impl From<MatrixDecomposed3D> for Matrix3D
impl From<MatrixDecomposed3D> for Matrix3D
source§fn from(decomposed: MatrixDecomposed3D) -> Matrix3D
fn from(decomposed: MatrixDecomposed3D) -> Matrix3D
Recompose a 3D matrix. https://drafts.csswg.org/css-transforms/#recomposing-to-a-3d-matrix
source§impl From<Transform3D<f32, UnknownUnit, UnknownUnit>> for Matrix3D
impl From<Transform3D<f32, UnknownUnit, UnknownUnit>> for Matrix3D
source§fn from(m: Transform3D<CSSFloat>) -> Self
fn from(m: Transform3D<CSSFloat>) -> Self
Converts to this type from the input type.
source§impl<T> MallocSizeOf for GenericMatrix3D<T>where
T: MallocSizeOf,
impl<T> MallocSizeOf for GenericMatrix3D<T>where T: MallocSizeOf,
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
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>
impl<T: PartialEq> PartialEq<GenericMatrix3D<T>> for GenericMatrix3D<T>
source§fn eq(&self, other: &GenericMatrix3D<T>) -> bool
fn eq(&self, other: &GenericMatrix3D<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for GenericMatrix3D<T>where
T: Serialize,
impl<T> Serialize for GenericMatrix3D<T>where T: Serialize,
source§impl<T> SpecifiedValueInfo for GenericMatrix3D<T>
impl<T> SpecifiedValueInfo for GenericMatrix3D<T>
source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Supported CssTypes by the given value type. Read more
source§impl<T> ToComputedValue for GenericMatrix3D<T>where
T: ToComputedValue,
impl<T> ToComputedValue for GenericMatrix3D<T>where T: ToComputedValue,
§type ComputedValue = GenericMatrix3D<<T as ToComputedValue>::ComputedValue>
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
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
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,
impl<T> ToCss for GenericMatrix3D<T>where T: ToCss,
source§impl<T> ToResolvedValue for GenericMatrix3D<T>where
T: ToResolvedValue,
impl<T> ToResolvedValue for GenericMatrix3D<T>where T: ToResolvedValue,
§type ResolvedValue = GenericMatrix3D<<T as ToResolvedValue>::ResolvedValue>
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
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
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.