Struct acgmath::Matrix4 [] [src]

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

A 4 x 4, column major matrix

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

Fields

The first column of the matrix.

The second column of the matrix.

The third column of the matrix.

The fourth column of the matrix.

Methods

impl<S: BaseFloat> Matrix4<S>
[src]

Create a new matrix, providing values for each index.

Create a new matrix, providing columns.

Create a homogeneous transformation matrix from a translation vector.

Create a homogeneous transformation matrix from a scale value.

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

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

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

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

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

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

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

impl<S: NumCast + Copy> Matrix4<S>
[src]

Component-wise casting to another type

Trait Implementations

impl<S: Copy> Copy for Matrix4<S>
[src]

impl<S: Clone> Clone for Matrix4<S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: PartialEq> PartialEq for Matrix4<S>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<S: BaseFloat> Zero for Matrix4<S>
[src]

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

Returns true if self is equal to the additive identity.

impl<S: BaseFloat> One for Matrix4<S>
[src]

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

impl<S: BaseFloat> VectorSpace for Matrix4<S>
[src]

The associated scalar.

impl<S: BaseFloat> Matrix for Matrix4<S>
[src]

The column vector of the matrix.

The row vector of the matrix.

The result of transposing the matrix

Get a row from this matrix by-value.

Swap two rows of this array.

Swap two columns of this array.

Swap the values at index a and b

Transpose this matrix, returning a new matrix.

Get the pointer to the first element of the array.

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

Replace a column in the array.

impl<S: BaseFloat> SquareMatrix for Matrix4<S>
[src]

The row/column vector of the matrix. Read more

Create a new diagonal matrix using the supplied value.

Create a matrix from a non-uniform scale

Transpose this matrix in-place.

Take the determinant of this matrix.

Return a vector containing the diagonal of this matrix.

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). Read more

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

Test if this matrix is symmetric. That is, it is equal to its transpose. Read more

The [identity matrix]. Multiplying this matrix with another should have no effect. Read more

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

Test if this matrix is invertible.

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

impl<S: BaseFloat> ApproxEq for Matrix4<S>
[src]

Used for specifying relative comparisons.

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

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

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

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

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

The inverse of ApproxEq::relative_eq.

The inverse of ApproxEq::ulps_eq.

impl<S: BaseFloat> Transform<Point3<S>> for Matrix4<S>
[src]

Create an identity transformation. That is, a transformation which does nothing. Read more

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

Transform a vector using this transform.

Transform a point using this transform.

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

Create a transform that "un-does" this one.

Combine this transform with another, in-place.

impl<S: BaseFloat> Transform3<S> for Matrix4<S>
[src]

impl<S: BaseFloat> Neg for Matrix4<S>
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<'a, S: BaseFloat> Neg for &'a Matrix4<S>
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<S: BaseFloat> Mul<S> for Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, S: BaseFloat> Mul<S> for &'a Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<S: BaseFloat> Div<S> for Matrix4<S>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, S: BaseFloat> Div<S> for &'a Matrix4<S>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<S: BaseFloat> Rem<S> for Matrix4<S>
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a, S: BaseFloat> Rem<S> for &'a Matrix4<S>
[src]

The resulting type after applying the % operator

The method for the % operator

impl<S: BaseFloat + MulAssign<S>> MulAssign<S> for Matrix4<S>
[src]

The method for the *= operator

impl<S: BaseFloat + DivAssign<S>> DivAssign<S> for Matrix4<S>
[src]

The method for the /= operator

impl<S: BaseFloat + RemAssign<S>> RemAssign<S> for Matrix4<S>
[src]

The method for the %= operator

impl<S: BaseFloat> Add<Matrix4<S>> for Matrix4<S>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, S: BaseFloat> Add<&'a Matrix4<S>> for Matrix4<S>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, S: BaseFloat> Add<Matrix4<S>> for &'a Matrix4<S>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b, S: BaseFloat> Add<&'a Matrix4<S>> for &'b Matrix4<S>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<S: BaseFloat> Sub<Matrix4<S>> for Matrix4<S>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, S: BaseFloat> Sub<&'a Matrix4<S>> for Matrix4<S>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, S: BaseFloat> Sub<Matrix4<S>> for &'a Matrix4<S>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b, S: BaseFloat> Sub<&'a Matrix4<S>> for &'b Matrix4<S>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<S: BaseFloat + AddAssign<S>> AddAssign<Matrix4<S>> for Matrix4<S>
[src]

The method for the += operator

impl<S: BaseFloat + SubAssign<S>> SubAssign<Matrix4<S>> for Matrix4<S>
[src]

The method for the -= operator

impl<S: BaseFloat> Mul<Vector4<S>> for Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, S: BaseFloat> Mul<&'a Vector4<S>> for Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, S: BaseFloat> Mul<Vector4<S>> for &'a Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b, S: BaseFloat> Mul<&'a Vector4<S>> for &'b Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<S: BaseFloat> Mul<Matrix4<S>> for Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, S: BaseFloat> Mul<&'a Matrix4<S>> for Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, S: BaseFloat> Mul<Matrix4<S>> for &'a Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b, S: BaseFloat> Mul<&'a Matrix4<S>> for &'b Matrix4<S>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<S> Index<usize> for Matrix4<S>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<S> IndexMut<usize> for Matrix4<S>
[src]

The method for the mutable indexing (container[index]) operation

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

impl<S: BaseFloat> From<Matrix2<S>> for Matrix4<S>
[src]

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

impl<S: BaseFloat> From<Matrix3<S>> for Matrix4<S>
[src]

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

impl<S: Debug> Debug for Matrix4<S>
[src]

Formats the value using the given formatter.

impl<S: BaseFloat + Rand> Rand for Matrix4<S>
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl<S: BaseFloat> From<Quaternion<S>> for Matrix4<S>
[src]

Convert the quaternion to a 4 x 4 rotation matrix

impl<S: BaseFloat, R: Rotation3<S>> From<Decomposed<Vector3<S>, R>> for Matrix4<S>
[src]

Performs the conversion.

impl<S: BaseFloat> From<PerspectiveFov<S>> for Matrix4<S>
[src]

Performs the conversion.

impl<S: BaseFloat> From<Perspective<S>> for Matrix4<S>
[src]

Performs the conversion.

impl<S: BaseFloat> From<Ortho<S>> for Matrix4<S>
[src]

Performs the conversion.