Click or drag to resize
Matrix4 Structure
4x4 matrix, typically used to describe a transformation (rotation and translation).

Namespace:  ABB.Robotics.Math
Assembly:  ABB.Robotics.Math (in ABB.Robotics.Math.dll) Version: 7.0.8747.636
Syntax
C#
public struct Matrix4

The Matrix4 type exposes the following members.

Constructors
  NameDescription
Public methodMatrix4(Vector3)
Creates a matrix with unit rotation and a specified translation.
Public methodMatrix4(Double, Boolean)
Creates a matrix from an array of 16 values.
Public methodMatrix4(Matrix3, Vector3)
Constructs a matrix from a 3x3 orientation matrix and a translation.
Public methodMatrix4(Vector3, Quaternion)
Creates a matrix from a translation vector and a quaternion.
Public methodMatrix4(Vector3, Vector3)
Creates a matrix from a translation vector and Euler angles (zyx).
Public methodMatrix4(Vector3, Double)
Creates a matrix from a rotation axis and angle, with unit translation.
Public methodMatrix4(Vector3, Vector3, Vector3, Vector3)
Creates an affine matrix from four vectors
Public methodMatrix4(Vector4, Vector4, Vector4, Vector4)
Creates a matrix from four column vectors.
Top
Properties
  NameDescription
Public propertyAxisAngle
Gets/sets the rotation as axis/angle (represented by a 4-vector [axis,angle]).
Public propertyElements
Returns an array of all elements in column-first order.
Public propertyEulerXYZ
Gets/sets the rotation as Euler angles (xyz order).
Public propertyEulerZYX
Gets/sets the rotation as Euler angles (zyx order).
Note: the vector contains the angles as [rx,ry,rz].
Public propertyIsNaN
Returns a value indicating whether any elements evaluates to a value that is not a number (NaN).
Public propertyItem
Column vector access.
Public propertyQuaternion
Gets/sets the rotation as a quaternion.
Public propertyTranslation
Gets/sets the translation vector.
Public propertyUpperLeft
Gets/sets the rotation as a 3x3 matrix.
Top
Methods
  NameDescription
Public methodAlmostEquals(Matrix4)
Comparison method for matrices with default tolerance
Public methodAlmostEquals(Matrix4, Double)
Comparison method for matrices with tolerance
Public methodCheckRigid
Throws an exception if this matrix is not rigid.
Public methodClean
Zeroes any values smaller than Globals.EPS.
Public methodCleanRigid
Ensures this is a valid rigid matrix
Public methodDeterminant
Returns the determinant.
Public methodEquals (Inherited from ValueType.)
Public methodStatic memberFromAxis
Returns a matrix with one given axis. The other two axes are arbitrarily chosen to form a right-handed coordinate system.
Public methodStatic memberFromThreePoint
Creates a matrix from three points.
Public methodStatic memberFromTwoAxes
Creates a matrix from a translation and two axis vectors
Public methodStatic memberFromTwoPointXY
Creates a matrix from a translation and two points
Public methodStatic memberFromTwoPointXZ
Creates a matrix from a translation and two points
Public methodGetAxisVector
Gets the axis vector from the specified axis
Public methodGetHashCode (Inherited from ValueType.)
Public methodGetType (Inherited from Object.)
Public methodInverse
Returns the inverse of a general matrix.
Public methodInverseRigid
Returns a an inverted copy of the matrix. If the matrix is non-rigid the result is undefined.
Public methodInvert
Inverts a general matrix, using Cramer's rule.
Public methodInvertAffine
Inverts an affine matrix.
Public methodInvertRigid
Inverts a rigid (pure translation+rotation) matrix.
Public methodIsAffine
Returns true if the matrix is affine.
Public methodIsEmpty
Returns true if all elements in the matrix are zero.
Public methodIsIdentity
Returns true if the matrix is identity.
Public methodIsRigid
Returns true if this matrix is rigid (orthogonal), e.g. it represents a pure rotation and translation.
Public methodMultiply(Matrix4)
Matrix-Matrix multiplication method.
Public methodMultiply(Vector4)
Matrix-Vector4 multiplication method.
Public methodMultiplyPoint
Matrix-Vector3 (interpreted as a point) multiplication.
Public methodMultiplyVector
Matrix-Vector3 (interpreted as a direction) multiplication.
Public methodStatic memberRelativeMatrix
Returns a matrix representing the relative transform, between the two specified matrices.
Public methodRotate(Vector3, Double)
Rotates the matrix around an axis through the origin.
Public methodRotate(Vector3, Vector3, Double)
Rotates the matrix around an axis through a point.
Public methodScale(Double)
Scale uniformly about origin.
Public methodScale(Vector3)
Scale by vector about origin.
Public methodScale(Vector3, Vector3)
Scale by vector about a point.
Public methodToString
Returns a string in the format
[[x.x x.y x.z x.w] [y.x y.y y.z y.w] [z.x z.y z.z z.w] [t.x t.y t.z t.w]]
(Overrides ValueTypeToString.)
Public methodTranslate(Vector3)
Translates the matrix by a vector.
Public methodTranslate(Double, Double, Double)
Translates the matrix by x,y,z.
Public methodTranslateLocal(Vector3)
Translates the matrix by a vector in its own coordinate system.
Public methodTranslateLocal(Double, Double, Double)
Translates the matrix by x,y,z in its own coordinate system.
Public methodTranspose
Transposes the matrix.
Public methodStatic memberTryParse
Converts the string representation to its Matrix4 equivalent.
Public methodWithEulerZYX
Returns a new Matrix4 with the given Euler ZYX orientation
Public methodWithTranslation
Returns a new Matrix4 with the given translation
Top
Operators
  NameDescription
Public operatorStatic memberMultiply(Matrix4, Matrix4)
Matrix-Matrix multiplication operator.
Public operatorStatic memberMultiply(Matrix4, Vector4)
Matrix-Vector4 multiplication operator.
Top
Fields
  NameDescription
Public fieldStatic memberIdentity
Identity matrix.
Public fieldt
Column vector.
Public fieldx
Column vector.
Public fieldy
Column vector.
Public fieldz
Column vector.
Top
Version Information

Supported in: 1.0
See Also