Struct tri_mesh::math::Matrix4

source ·
#[repr(C)]
pub struct Matrix4<S> { pub x: Vector4<S>, pub y: Vector4<S>, pub z: Vector4<S>, pub w: Vector4<S>, }
Expand description

A 4 x 4, column major matrix

This type is marked as #[repr(C)].

Fields§

§x: Vector4<S>

The first column of the matrix.

§y: Vector4<S>

The second column of the matrix.

§z: Vector4<S>

The third column of the matrix.

§w: Vector4<S>

The fourth column of the matrix.

Implementations§

source§

impl<S> Matrix4<S>

source

pub const fn new( c0r0: S, c0r1: S, c0r2: S, c0r3: S, c1r0: S, c1r1: S, c1r2: S, c1r3: S, c2r0: S, c2r1: S, c2r2: S, c2r3: S, c3r0: S, c3r1: S, c3r2: S, c3r3: S, ) -> Matrix4<S>

Create a new matrix, providing values for each index.

source

pub const fn from_cols( c0: Vector4<S>, c1: Vector4<S>, c2: Vector4<S>, c3: Vector4<S>, ) -> Matrix4<S>

Create a new matrix, providing columns.

source§

impl<S> Matrix4<S>
where S: BaseFloat,

source

pub fn from_translation(v: Vector3<S>) -> Matrix4<S>

Create a homogeneous transformation matrix from a translation vector.

source

pub fn from_scale(value: S) -> Matrix4<S>

Create a homogeneous transformation matrix from a scale value.

source

pub fn from_nonuniform_scale(x: S, y: S, z: S) -> Matrix4<S>

Create a homogeneous transformation matrix from a set of scale values.

source

pub fn look_at_dir( eye: Point3<S>, dir: Vector3<S>, up: Vector3<S>, ) -> Matrix4<S>

👎Deprecated: Use Matrix4::look_to_rh

Create a homogeneous transformation matrix that will cause a vector to point at dir, using up for orientation.

source

pub fn look_to_rh(eye: Point3<S>, dir: Vector3<S>, up: Vector3<S>) -> Matrix4<S>

Create a homogeneous transformation matrix that will cause a vector to point at dir, using up for orientation.

source

pub fn look_to_lh(eye: Point3<S>, dir: Vector3<S>, up: Vector3<S>) -> Matrix4<S>

Create a homogeneous transformation matrix that will cause a vector to point at dir, using up for orientation.

source

pub fn look_at(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>

👎Deprecated: Use Matrix4::look_at_rh

Create a homogeneous transformation matrix that will cause a vector to point at center, using up for orientation.

source

pub fn look_at_rh( eye: Point3<S>, center: Point3<S>, up: Vector3<S>, ) -> Matrix4<S>

Create a homogeneous transformation matrix that will cause a vector to point at center, using up for orientation.

source

pub fn look_at_lh( eye: Point3<S>, center: Point3<S>, up: Vector3<S>, ) -> Matrix4<S>

Create a homogeneous transformation matrix that will cause a vector to point at center, using up for orientation.

source

pub fn from_angle_x<A>(theta: A) -> Matrix4<S>
where A: Into<Rad<S>>,

Create a homogeneous transformation matrix from a rotation around the x axis (pitch).

source

pub fn from_angle_y<A>(theta: A) -> Matrix4<S>
where A: Into<Rad<S>>,

Create a homogeneous transformation matrix from a rotation around the y axis (yaw).

source

pub fn from_angle_z<A>(theta: A) -> Matrix4<S>
where A: Into<Rad<S>>,

Create a homogeneous transformation matrix from a rotation around the z axis (roll).

source

pub fn from_axis_angle<A>(axis: Vector3<S>, angle: A) -> Matrix4<S>
where A: Into<Rad<S>>,

Create a homogeneous transformation matrix from an angle around an arbitrary axis.

The specified axis must be normalized, or it represents an invalid rotation.

source

pub fn is_finite(&self) -> bool

Are all entries in the matrix finite.

source§

impl<S> Matrix4<S>
where S: NumCast + Copy,

source

pub fn cast<T>(&self) -> Option<Matrix4<T>>
where T: NumCast,

Component-wise casting to another type

Trait Implementations§

source§

impl<S> AbsDiffEq for Matrix4<S>
where S: BaseFloat,

source§

type Epsilon = <S as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
source§

fn default_epsilon() -> <S as AbsDiffEq>::Epsilon

The default tolerance to use when testing values that are close together. Read more
source§

fn abs_diff_eq( &self, other: &Matrix4<S>, epsilon: <S as AbsDiffEq>::Epsilon, ) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
source§

impl<'a, 'b, S> Add<&'a Matrix4<S>> for &'b Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Matrix4<S>) -> Matrix4<S>

Performs the + operation. Read more
source§

impl<'a, S> Add<&'a Matrix4<S>> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Matrix4<S>) -> Matrix4<S>

Performs the + operation. Read more
source§

impl<'a, S> Add<Matrix4<S>> for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Matrix4<S>) -> Matrix4<S>

Performs the + operation. Read more
source§

impl<S> Add for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Matrix4<S>) -> Matrix4<S>

Performs the + operation. Read more
source§

impl<S> AddAssign for Matrix4<S>
where S: BaseFloat + AddAssign,

source§

fn add_assign(&mut self, other: Matrix4<S>)

Performs the += operation. Read more
source§

impl<S> AsMut<[[S; 4]; 4]> for Matrix4<S>

source§

fn as_mut(&mut self) -> &mut [[S; 4]; 4]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<S> AsMut<[S; 16]> for Matrix4<S>

source§

fn as_mut(&mut self) -> &mut [S; 16]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<S> AsRef<[[S; 4]; 4]> for Matrix4<S>

source§

fn as_ref(&self) -> &[[S; 4]; 4]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<S> AsRef<[S; 16]> for Matrix4<S>

source§

fn as_ref(&self) -> &[S; 16]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<S> Clone for Matrix4<S>
where S: Clone,

source§

fn clone(&self) -> Matrix4<S>

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<S> Debug for Matrix4<S>
where S: Debug,

source§

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

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

impl<'a> Div<&'a Matrix4<u32>> for u32

source§

type Output = Matrix4<u32>

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Matrix4<u32>) -> Matrix4<u32>

Performs the / operation. Read more
source§

impl Div<Matrix4<u32>> for u32

source§

type Output = Matrix4<u32>

The resulting type after applying the / operator.
source§

fn div(self, other: Matrix4<u32>) -> Matrix4<u32>

Performs the / operation. Read more
source§

impl<'a, S> Div<S> for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the / operator.
source§

fn div(self, other: S) -> Matrix4<S>

Performs the / operation. Read more
source§

impl<S> Div<S> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the / operator.
source§

fn div(self, other: S) -> Matrix4<S>

Performs the / operation. Read more
source§

impl<S> DivAssign<S> for Matrix4<S>
where S: BaseFloat + DivAssign,

source§

fn div_assign(&mut self, scalar: S)

Performs the /= operation. Read more
source§

impl<'a, S> From<&'a [[S; 4]; 4]> for &'a Matrix4<S>

source§

fn from(m: &'a [[S; 4]; 4]) -> &'a Matrix4<S>

Converts to this type from the input type.
source§

impl<'a, S> From<&'a [S; 16]> for &'a Matrix4<S>

source§

fn from(m: &'a [S; 16]) -> &'a Matrix4<S>

Converts to this type from the input type.
source§

impl<'a, S> From<&'a mut [[S; 4]; 4]> for &'a mut Matrix4<S>

source§

fn from(m: &'a mut [[S; 4]; 4]) -> &'a mut Matrix4<S>

Converts to this type from the input type.
source§

impl<'a, S> From<&'a mut [S; 16]> for &'a mut Matrix4<S>

source§

fn from(m: &'a mut [S; 16]) -> &'a mut Matrix4<S>

Converts to this type from the input type.
source§

impl<S> From<[[S; 4]; 4]> for Matrix4<S>
where S: Copy,

source§

fn from(m: [[S; 4]; 4]) -> Matrix4<S>

Converts to this type from the input type.
source§

impl<S, R> From<Decomposed<Vector3<S>, R>> for Matrix4<S>
where S: BaseFloat, R: Rotation3<Scalar = S>,

source§

fn from(dec: Decomposed<Vector3<S>, R>) -> Matrix4<S>

Converts to this type from the input type.
source§

impl<A> From<Euler<A>> for Matrix4<<A as Angle>::Unitless>
where A: Angle + Into<Rad<<A as Angle>::Unitless>>,

source§

fn from(src: Euler<A>) -> Matrix4<<A as Angle>::Unitless>

Converts to this type from the input type.
source§

impl<S> From<Matrix2<S>> for Matrix4<S>
where S: BaseFloat,

source§

fn from(m: Matrix2<S>) -> Matrix4<S>

Clone the elements of a 2-dimensional matrix into the top-left corner of a 4-dimensional identity matrix.

source§

impl<S> From<Matrix3<S>> for Matrix4<S>
where S: BaseFloat,

source§

fn from(m: Matrix3<S>) -> Matrix4<S>

Clone the elements of a 3-dimensional matrix into the top-left corner of a 4-dimensional identity matrix.

source§

impl<S> From<Ortho<S>> for Matrix4<S>
where S: BaseFloat,

source§

fn from(ortho: Ortho<S>) -> Matrix4<S>

Converts to this type from the input type.
source§

impl<S> From<Perspective<S>> for Matrix4<S>
where S: BaseFloat,

source§

fn from(persp: Perspective<S>) -> Matrix4<S>

Converts to this type from the input type.
source§

impl<S> From<PerspectiveFov<S>> for Matrix4<S>
where S: BaseFloat,

source§

fn from(persp: PerspectiveFov<S>) -> Matrix4<S>

Converts to this type from the input type.
source§

impl<S> From<Quaternion<S>> for Matrix4<S>
where S: BaseFloat,

source§

fn from(quat: Quaternion<S>) -> Matrix4<S>

Convert the quaternion to a 4 x 4 rotation matrix.

source§

impl<S> Index<usize> for Matrix4<S>

source§

type Output = Vector4<S>

The returned type after indexing.
source§

fn index<'a>(&'a self, i: usize) -> &'a Vector4<S>

Performs the indexing (container[index]) operation. Read more
source§

impl<S> IndexMut<usize> for Matrix4<S>

source§

fn index_mut<'a>(&'a mut self, i: usize) -> &'a mut Vector4<S>

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<S> Into<[[S; 4]; 4]> for Matrix4<S>

source§

fn into(self) -> [[S; 4]; 4]

Converts this type into the (usually inferred) input type.
source§

impl<S> Matrix for Matrix4<S>
where S: BaseFloat,

source§

type Column = Vector4<S>

The column vector of the matrix.
source§

type Row = Vector4<S>

The row vector of the matrix.
source§

type Transpose = Matrix4<S>

The result of transposing the matrix
source§

fn row(&self, r: usize) -> Vector4<S>

Get a row from this matrix by-value.
source§

fn swap_rows(&mut self, a: usize, b: usize)

Swap two rows of this array.
source§

fn swap_columns(&mut self, a: usize, b: usize)

Swap two columns of this array.
source§

fn swap_elements(&mut self, a: (usize, usize), b: (usize, usize))

Swap the values at index a and b
source§

fn transpose(&self) -> Matrix4<S>

Transpose this matrix, returning a new matrix.
source§

fn as_ptr(&self) -> *const Self::Scalar

Get the pointer to the first element of the array.
source§

fn as_mut_ptr(&mut self) -> *mut Self::Scalar

Get a mutable pointer to the first element of the array.
source§

fn replace_col(&mut self, c: usize, src: Self::Column) -> Self::Column

Replace a column in the array.
source§

impl<'a, 'b, S> Mul<&'a Matrix4<S>> for &'b Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Matrix4<S>) -> Matrix4<S>

Performs the * operation. Read more
source§

impl<'a, S> Mul<&'a Matrix4<S>> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Matrix4<S>) -> Matrix4<S>

Performs the * operation. Read more
source§

impl<'a> Mul<&'a Matrix4<u32>> for u32

source§

type Output = Matrix4<u32>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Matrix4<u32>) -> Matrix4<u32>

Performs the * operation. Read more
source§

impl<'a, 'b, S> Mul<&'a Vector4<S>> for &'b Matrix4<S>
where S: BaseFloat,

source§

type Output = Vector4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector4<S>) -> Vector4<S>

Performs the * operation. Read more
source§

impl<'a, S> Mul<&'a Vector4<S>> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Vector4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a Vector4<S>) -> Vector4<S>

Performs the * operation. Read more
source§

impl<'a, S> Mul<Matrix4<S>> for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: Matrix4<S>) -> Matrix4<S>

Performs the * operation. Read more
source§

impl Mul<Matrix4<u32>> for u32

source§

type Output = Matrix4<u32>

The resulting type after applying the * operator.
source§

fn mul(self, other: Matrix4<u32>) -> Matrix4<u32>

Performs the * operation. Read more
source§

impl<'a, S> Mul<S> for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: S) -> Matrix4<S>

Performs the * operation. Read more
source§

impl<S> Mul<S> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: S) -> Matrix4<S>

Performs the * operation. Read more
source§

impl<'a, S> Mul<Vector4<S>> for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Vector4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector4<S>) -> Vector4<S>

Performs the * operation. Read more
source§

impl<S> Mul<Vector4<S>> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Vector4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: Vector4<S>) -> Vector4<S>

Performs the * operation. Read more
source§

impl<S> Mul for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: Matrix4<S>) -> Matrix4<S>

Performs the * operation. Read more
source§

impl<S> MulAssign<S> for Matrix4<S>
where S: BaseFloat + MulAssign,

source§

fn mul_assign(&mut self, scalar: S)

Performs the *= operation. Read more
source§

impl<'a, S> Neg for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the - operator.
source§

fn neg(self) -> Matrix4<S>

Performs the unary - operation. Read more
source§

impl<S> Neg for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the - operator.
source§

fn neg(self) -> Matrix4<S>

Performs the unary - operation. Read more
source§

impl<S> One for Matrix4<S>
where S: BaseFloat,

source§

fn one() -> Matrix4<S>

Returns the multiplicative identity element of Self, 1. Read more
source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
source§

impl<S> PartialEq for Matrix4<S>
where S: PartialEq,

source§

fn eq(&self, other: &Matrix4<S>) -> bool

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

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, S> Product<&'a Matrix4<S>> for Matrix4<S>
where S: 'a + BaseFloat,

source§

fn product<I>(iter: I) -> Matrix4<S>
where I: Iterator<Item = &'a Matrix4<S>>,

Takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<S> Product for Matrix4<S>
where S: BaseFloat,

source§

fn product<I>(iter: I) -> Matrix4<S>
where I: Iterator<Item = Matrix4<S>>,

Takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<S> RelativeEq for Matrix4<S>
where S: BaseFloat,

source§

fn default_max_relative() -> <S as AbsDiffEq>::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
source§

fn relative_eq( &self, other: &Matrix4<S>, epsilon: <S as AbsDiffEq>::Epsilon, max_relative: <S as AbsDiffEq>::Epsilon, ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of RelativeEq::relative_eq.
source§

impl<'a> Rem<&'a Matrix4<u32>> for u32

source§

type Output = Matrix4<u32>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Matrix4<u32>) -> Matrix4<u32>

Performs the % operation. Read more
source§

impl Rem<Matrix4<u32>> for u32

source§

type Output = Matrix4<u32>

The resulting type after applying the % operator.
source§

fn rem(self, other: Matrix4<u32>) -> Matrix4<u32>

Performs the % operation. Read more
source§

impl<'a, S> Rem<S> for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: S) -> Matrix4<S>

Performs the % operation. Read more
source§

impl<S> Rem<S> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: S) -> Matrix4<S>

Performs the % operation. Read more
source§

impl<S> RemAssign<S> for Matrix4<S>
where S: BaseFloat + RemAssign,

source§

fn rem_assign(&mut self, scalar: S)

Performs the %= operation. Read more
source§

impl<S> SquareMatrix for Matrix4<S>
where S: BaseFloat,

source§

type ColumnRow = Vector4<S>

The row/column vector of the matrix. Read more
source§

fn from_value(value: S) -> Matrix4<S>

Create a new diagonal matrix using the supplied value.
source§

fn from_diagonal(value: Vector4<S>) -> Matrix4<S>

Create a matrix from a non-uniform scale
source§

fn transpose_self(&mut self)

Transpose this matrix in-place.
source§

fn determinant(&self) -> S

Take the determinant of this matrix.
source§

fn diagonal(&self) -> Vector4<S>

Return a vector containing the diagonal of this matrix.
source§

fn invert(&self) -> Option<Matrix4<S>>

Invert this matrix, returning a new matrix. m.mul_m(m.invert()) is the identity matrix. Returns None if this matrix is not invertible (has a determinant of zero).
source§

fn is_diagonal(&self) -> bool

Test if this is a diagonal matrix. That is, every element outside of the diagonal is 0.
source§

fn is_symmetric(&self) -> bool

Test if this matrix is symmetric. That is, it is equal to its transpose.
source§

fn identity() -> Self

The identity matrix. Multiplying this matrix with another should have no effect. Read more
source§

fn trace(&self) -> Self::Scalar

Return the trace of this matrix. That is, the sum of the diagonal.
source§

fn is_identity(&self) -> bool
where Self: UlpsEq,

Test if this matrix is the identity matrix. That is, it is diagonal and every element in the diagonal is one.
source§

impl<'a, 'b, S> Sub<&'a Matrix4<S>> for &'b Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Matrix4<S>) -> Matrix4<S>

Performs the - operation. Read more
source§

impl<'a, S> Sub<&'a Matrix4<S>> for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Matrix4<S>) -> Matrix4<S>

Performs the - operation. Read more
source§

impl<'a, S> Sub<Matrix4<S>> for &'a Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Matrix4<S>) -> Matrix4<S>

Performs the - operation. Read more
source§

impl<S> Sub for Matrix4<S>
where S: BaseFloat,

source§

type Output = Matrix4<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Matrix4<S>) -> Matrix4<S>

Performs the - operation. Read more
source§

impl<S> SubAssign for Matrix4<S>
where S: BaseFloat + SubAssign,

source§

fn sub_assign(&mut self, other: Matrix4<S>)

Performs the -= operation. Read more
source§

impl<'a, S> Sum<&'a Matrix4<S>> for Matrix4<S>
where S: 'a + BaseFloat,

source§

fn sum<I>(iter: I) -> Matrix4<S>
where I: Iterator<Item = &'a Matrix4<S>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<S> Sum for Matrix4<S>
where S: BaseFloat,

source§

fn sum<I>(iter: I) -> Matrix4<S>
where I: Iterator<Item = Matrix4<S>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<S> Transform<Point3<S>> for Matrix4<S>
where S: BaseFloat,

source§

fn look_at(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>

👎Deprecated: Use look_at_rh or look_at_lh
Create a transformation that rotates a vector to look at center from eye, using up for orientation.
source§

fn look_at_lh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>

Create a transformation that rotates a vector to look at center from eye, using up for orientation.
source§

fn look_at_rh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>

Create a transformation that rotates a vector to look at center from eye, using up for orientation.
source§

fn transform_vector(&self, vec: Vector3<S>) -> Vector3<S>

Transform a vector using this transform.
source§

fn transform_point(&self, point: Point3<S>) -> Point3<S>

Transform a point using this transform.
source§

fn concat(&self, other: &Matrix4<S>) -> Matrix4<S>

Combine this transform with another, yielding a new transformation which has the effects of both.
source§

fn inverse_transform(&self) -> Option<Matrix4<S>>

Create a transform that “un-does” this one.
source§

fn inverse_transform_vector( &self, vec: <P as EuclideanSpace>::Diff, ) -> Option<<P as EuclideanSpace>::Diff>

Inverse transform a vector using this transform
source§

fn concat_self(&mut self, other: &Self)

Combine this transform with another, in-place.
source§

impl<S> Transform3 for Matrix4<S>
where S: BaseFloat,

source§

impl<S> UlpsEq for Matrix4<S>
where S: BaseFloat,

source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
source§

fn ulps_eq( &self, other: &Matrix4<S>, epsilon: <S as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
source§

impl<S> VectorSpace for Matrix4<S>
where S: BaseFloat,

source§

type Scalar = S

The associated scalar.
source§

fn lerp(self, other: Self, amount: Self::Scalar) -> Self

Returns the result of linearly interpolating the vector towards other by the specified amount.
source§

impl<S> Zero for Matrix4<S>
where S: BaseFloat,

source§

fn zero() -> Matrix4<S>

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl<S> Copy for Matrix4<S>
where S: Copy,

source§

impl<S> StructuralPartialEq for Matrix4<S>

Auto Trait Implementations§

§

impl<S> Freeze for Matrix4<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Matrix4<S>
where S: RefUnwindSafe,

§

impl<S> Send for Matrix4<S>
where S: Send,

§

impl<S> Sync for Matrix4<S>
where S: Sync,

§

impl<S> Unpin for Matrix4<S>
where S: Unpin,

§

impl<S> UnwindSafe for Matrix4<S>
where S: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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<T> ToOwned for T
where T: Clone,

source§

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 T
where U: Into<T>,

source§

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 T
where U: TryFrom<T>,

source§

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.
source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,