Struct Matrix3
3x3 matrix, typically used to describe a rotation.
Assembly: ABB.Robotics.Math.dll
Syntax
Constructors
View Source
Matrix3(Matrix4)
Creates a 3x3 matrix from the upper-left part of a 4x4 matrix.
Corresponds to extracting the rotation part of a transformation matrix.
Declaration
public Matrix3(Matrix4 mat)
Parameters
View Source
Matrix3(Vector3, Vector3, Vector3)
Creates a matrix from three column vectors.
Declaration
public Matrix3(Vector3 x0, Vector3 y0, Vector3 z0)
Parameters
View Source
Matrix3(double, double, double, double, double, double, double, double, double)
Creates a matrix from elements row by row.
Declaration
public Matrix3(double e11, double e12, double e13, double e21, double e22, double e23, double e31, double e32, double e33)
Parameters
Fields
View Source
Identity
Declaration
public static readonly Matrix3 Identity
Field Value
View Source
x
Declaration
Field Value
View Source
y
Declaration
Field Value
View Source
z
Declaration
Field Value
Properties
View Source
Elements
Returns an array of all elements in column-first order.
Declaration
public double[] Elements { get; }
Property Value
View Source
this[int]
Declaration
public Vector3 this[int index] { get; set; }
Parameters
| Type |
Name |
Description |
| int |
index |
|
Property Value
Methods
View Source
AlmostEquals(Matrix3)
Comparison method for matrices with tolerance
Declaration
public bool AlmostEquals(Matrix3 rhs)
Parameters
| Type |
Name |
Description |
| Matrix3 |
rhs |
Matrix to compare with
|
Returns
| Type |
Description |
| bool |
true if equals within tolerance
|
View Source
Clean()
Zeroes any values smaller than Globals.EPS.
Declaration
View Source
Determinant()
Declaration
public double Determinant()
Returns
View Source
Inverse()
Declaration
Returns
| Type |
Description |
| Matrix3 |
Inverted matrix
|
View Source
Invert()
Inverts the matrix, using Cramer's rule.
Declaration
View Source
Multiply(Matrix3)
Matrix-Matrix multiplication method.
Declaration
public Matrix3 Multiply(Matrix3 rhs)
Parameters
Returns
View Source
Multiply(Vector3)
Matrix-Vector3 multiplication method.
Declaration
public Vector3 Multiply(Vector3 rhs)
Parameters
Returns
View Source
ToString()
Returns a string in the format
[[x.x x.y x.z] [y.x y.y y.z] [z.x z.y z.z]]
Declaration
public override string ToString()
Returns
Overrides
View Source
Returns a string in the format
[[x.x x.y x.z] [y.x y.y y.z] [z.x z.y z.z]]
Declaration
public string ToString(IFormatProvider formatProvider)
Parameters
Returns
View Source
Transpose()
Declaration
Operators
View Source
operator +(Matrix3, Matrix3)
Adds each element of the two Matrix3 values and returns the resulting Matrix3
Declaration
public static Matrix3 operator +(Matrix3 lhs, Matrix3 rhs)
Parameters
Returns
View Source
operator *(Matrix3, Matrix3)
Matrix-Matrix multiplication operator.
Declaration
public static Matrix3 operator *(Matrix3 lhs, Matrix3 rhs)
Parameters
Returns
View Source
operator *(Matrix3, Vector3)
Matrix-Vector3 multiplication operator.
Declaration
public static Vector3 operator *(Matrix3 lhs, Vector3 rhs)
Parameters
Returns
View Source
operator *(Matrix3, double)
Multiples each element with the supplied value and returns the resulting Matrix3
Declaration
public static Matrix3 operator *(Matrix3 lhs, double rhs)
Parameters
Returns