Matrix4x4 Structure

A structure encapsulating a 4x4 matrix.

Definition

Namespace: Karamba.Geometry
Assembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
C#
[SerializableAttribute]
public struct Matrix4x4 : IEquatable<Matrix4x4>
Inheritance
Object    ValueType    Matrix4x4
Implements
IEquatableMatrix4x4

Constructors

Matrix4x4(Matrix3x2) Initializes a new instance of the Matrix4x4 struct. Constructs a Matrix4x4 from the given Matrix3x2.
Matrix4x4(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double) Initializes a new instance of the Matrix4x4 struct. Constructs a Matrix4x4 from the given components.

Properties

Identity Gets the multiplicative identity matrix.
IsIdentity Gets a value indicating whether the matrix is the identity matrix.
Translation Gets or sets the translation component of this matrix.

Methods

Add Adds two matrices together.
CreateBillboard Creates a spherical billboard that rotates around a specified object position.
CreateConstrainedBillboard Creates a cylindrical billboard that rotates around a specified axis.
CreateFromAxisAngle Creates a matrix that rotates around an arbitrary vector.
CreateFromQuaternion Creates a rotation matrix from the given Quaternion rotation value.
CreateFromYawPitchRoll Creates a rotation matrix from the specified yaw, pitch, and roll.
CreateLookAt Creates a view matrix.
CreateOrthographic Creates an orthographic perspective matrix from the given view volume dimensions.
CreateOrthographicOffCenter Builds a customized, orthographic projection matrix.
CreatePerspective Creates a perspective projection matrix from the given view volume dimensions.
CreatePerspectiveFieldOfView Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances.
CreatePerspectiveOffCenter Creates a customized, perspective projection matrix.
CreateRotationX(Double) Creates a matrix for rotating points around the X-axis.
CreateRotationX(Double, Vector3) Creates a matrix for rotating points around the X-axis, from a center point.
CreateRotationY(Double) Creates a matrix for rotating points around the Y-axis.
CreateRotationY(Double, Vector3) Creates a matrix for rotating points around the Y-axis, from a center point.
CreateRotationZ(Double) Creates a matrix for rotating points around the Z-axis.
CreateRotationZ(Double, Vector3) Creates a matrix for rotating points around the Z-axis, from a center point.
CreateScale(Double) Creates a uniform scaling matrix that scales equally on each axis.
CreateScale(Vector3) Creates a scaling matrix.
CreateScale(Double, Vector3) Creates a uniform scaling matrix that scales equally on each axis with a center point.
CreateScale(Vector3, Vector3) Creates a scaling matrix with a center point.
CreateScale(Double, Double, Double) Creates a scaling matrix.
CreateScale(Double, Double, Double, Vector3) Creates a scaling matrix with a center point.
CreateTranslation(Vector3) Creates a translation matrix.
CreateTranslation(Double, Double, Double) Creates a translation matrix.
CreateWorld Creates a world matrix with the specified parameters.
Equals(Matrix4x4) Returns a boolean indicating whether this matrix instance is equal to the other given matrix.
Equals(Object) Returns a boolean indicating whether the given Object is equal to this matrix instance.
(Overrides ValueTypeEquals(Object))
GetDeterminant Calculates the determinant of the matrix.
GetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
GetType Gets the Type of the current instance.
(Inherited from Object)
Invert Attempts to calculate the inverse of the given matrix. If successful, result will contain the inverted matrix.
Lerp Linearly interpolates between the corresponding values of two matrices.
Multiply(Matrix4x4, Matrix4x4) Multiplies a matrix by another matrix.
Multiply(Matrix4x4, Double) Multiplies a matrix by a scalar value.
Negate Returns a new matrix with the negated elements of the given matrix.
Subtract Subtracts the second matrix from the first.
ToString Returns a String representing this matrix instance.
(Overrides ValueTypeToString)
Transform Transforms the given matrix by applying the given Quaternion rotation.
Transpose Transposes the rows and columns of a matrix.

Operators

Addition(Matrix4x4, Matrix4x4) Adds two matrices together.
Equality(Matrix4x4, Matrix4x4) Returns a boolean indicating whether the given two matrices are equal.
Inequality(Matrix4x4, Matrix4x4) Returns a boolean indicating whether the given two matrices are not equal.
Multiply(Matrix4x4, Matrix4x4) Multiplies a matrix by another matrix.
Multiply(Matrix4x4, Double) Multiplies a matrix by a scalar value.
Subtraction(Matrix4x4, Matrix4x4) Subtracts the second matrix from the first.
UnaryNegation(Matrix4x4) Returns a new matrix with the negated elements of the given matrix.

Fields

M11 Value at row 1, column 1 of the matrix.
M12 Value at row 1, column 2 of the matrix.
M13 Value at row 1, column 3 of the matrix.
M14 Value at row 1, column 4 of the matrix.
M21 Value at row 2, column 1 of the matrix.
M22 Value at row 2, column 2 of the matrix.
M23 Value at row 2, column 3 of the matrix.
M24 Value at row 2, column 4 of the matrix.
M31 Value at row 3, column 1 of the matrix.
M32 Value at row 3, column 2 of the matrix.
M33 Value at row 3, column 3 of the matrix.
M34 Value at row 3, column 4 of the matrix.
M41 Value at row 4, column 1 of the matrix.
M42 Value at row 4, column 2 of the matrix.
M43 Value at row 4, column 3 of the matrix.
M44 Value at row 4, column 4 of the matrix.

Extension Methods

ContainerType test if object is (a container like) a list or an array.
(Defined by MiniUtil)

See Also