Logo Euclid

RigidMatrix Type

A struct containing 12 floats, representing an immutable 4x3 rigid transformation matrix. This matrix guarantees to NOT scale, shear, flip, mirror, reflect or project. Angles are preserved. Lengths are preserved. Area is preserved. Volume is preserved. Transformations with 4x3 RigidMatrices are faster than with the more general 4x4 Matrices. A rigid matrix is made from a rotational 3x3 part whose columns and rows are orthogonal 3D unit-vectors. The last 1x3 column is the translation part of the matrix. It can be thought of as a 4x4 Orthonormal matrix where the last row would always be 0, 0, 0, 1. Thus it is not stored in the RigidMatrix 4x3 struct. The matrix is represented in the following column-vector syntax form:

 M11 M21 M31 X41
 M12 M22 M32 Y42
 M13 M23 M33 Z43
Where X41, Y42 and Z43 refer to the translation part of the RigidMatrix. The Determinant of this matrix is always 1.0. Note: Never use the struct default constructor RigidMatrix() as it will create an invalid zero RigidMatrix. Use RigidMatrix.create instead.

Record fields

Record Field Description

M11

Full Usage: M11

Field type: float

The element in row 1, column 1 of the matrix.

Field type: float

M12

Full Usage: M12

Field type: float

The element in row 2, column 1 of the matrix.

Field type: float

M13

Full Usage: M13

Field type: float

The element in row 3, column 1 of the matrix.

Field type: float

M21

Full Usage: M21

Field type: float

The element in row 1, column 2 of the matrix.

Field type: float

M22

Full Usage: M22

Field type: float

The element in row 2, column 2 of the matrix.

Field type: float

M23

Full Usage: M23

Field type: float

The element in row 3, column 2 of the matrix.

Field type: float

M31

Full Usage: M31

Field type: float

The element in row 1, column 3 of the matrix.

Field type: float

M32

Full Usage: M32

Field type: float

The element in row 2, column 3 of the matrix.

Field type: float

M33

Full Usage: M33

Field type: float

The element in row 3, column 3 of the matrix.

Field type: float

X41

Full Usage: X41

Field type: float

The X component of the translation in row 1, column 4 of the matrix.

Field type: float

Y42

Full Usage: Y42

Field type: float

The Y component of the translation in row 2, column 4 of the matrix.

Field type: float

Z43

Full Usage: Z43

Field type: float

The Z component of the translation in row 3, column 4 of the matrix.

Field type: float

Instance members

Instance member Description

this.AsFSharpCode

Full Usage: this.AsFSharpCode

Returns: string

Formats a RigidMatrix into an F# code string that can be used to recreate the matrix.

Returns: string

this.AsString

Full Usage: this.AsString

Returns: string

Nicely formats the Matrix to a Grid of 4x3.

Returns: string

this.ColumnVector1

Full Usage: this.ColumnVector1

Returns: Vec

Returns the first column vector. M11, M12 and M13.

Returns: Vec

this.ColumnVector2

Full Usage: this.ColumnVector2

Returns: Vec

Returns the second column vector. M21, M22 and M23.

Returns: Vec

this.ColumnVector3

Full Usage: this.ColumnVector3

Returns: Vec

Returns the third column vector. M31, M32 and M33.

Returns: Vec

this.Inverse

Full Usage: this.Inverse

Returns: RigidMatrix
Inverts the RigidMatrix.
 Rigid matrices always have determinant 1.0 so they can always be inverted.
Returns: RigidMatrix

this.IsIdentity

Full Usage: this.IsIdentity

Returns: bool

Checks if the Matrix is an Identity Matrix in the form of:

 1  0  0  0
 0  1  0  0
 0  0  1  0
Using an approximate tolerance of 1e-6.

Returns: bool

this.Then

Full Usage: this.Then

Parameters:
    other : RigidMatrix - The other RigidMatrix (applied second).

Returns: RigidMatrix A new RigidMatrix that transforms like this one followed by other.
Modifiers: inline

Combines this transformation with another one. The resulting transformation will first do this RigidMatrix and then the other. The application order is the same as in Matrix.Then and Quaternion.Then.

other : RigidMatrix

The other RigidMatrix (applied second).

Returns: RigidMatrix

A new RigidMatrix that transforms like this one followed by other.

this.ToArrayByColumns

Full Usage: this.ToArrayByColumns

Returns: float array

Returns the 12 elements column-major order:

[| M11 M12 M13 M21 M22 M23 M31 M32 M33 X41 Y42 Z43 |]
Where X41, Y42 and Z43 refer to the translation part of the RigidMatrix.

Returns: float array

this.ToArrayByRows

Full Usage: this.ToArrayByRows

Returns: float array

Returns the 12 elements in row-major order:

[| M11 M21 M31 X41 M12 M22 M32 Y42 M13 M23 M33 Z43 |]
Where X41, Y42 and Z43 refer to the translation part of the RigidMatrix.

Returns: float array

this.ToMatrix

Full Usage: this.ToMatrix

Returns: Matrix

Converts the 3x4 RigidMatrix to a general 4x4 Matrix.

Returns: Matrix

this.Translation

Full Usage: this.Translation

Returns: Vec

Returns the translation or fourth column vector. X41, Y42 and Z43.

Returns: Vec

Static members

Static member Description

v *** m

Full Usage: v *** m

Parameters:
    v : Pnt - The 3D point to transform.
    m : RigidMatrix - The transformation matrix.

Returns: Pnt
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D point.

v : Pnt

The 3D point to transform.

m : RigidMatrix

The transformation matrix.

Returns: Pnt

v *** m

Full Usage: v *** m

Parameters:
    v : UnitVec - The 3D unit-vector to transform.
    m : RigidMatrix - The transformation matrix.

Returns: UnitVec
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D unit-vector. Since a 3D vector represents a direction or translation in space, but not a location, all translations are ignored. (Homogeneous Vector)

v : UnitVec

The 3D unit-vector to transform.

m : RigidMatrix

The transformation matrix.

Returns: UnitVec

v *** m

Full Usage: v *** m

Parameters:
    v : Vec - The 3D vector to transform.
    m : RigidMatrix - The transformation matrix.

Returns: Vec
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D vector. Since a 3D vector represents a direction or translation in space, but not a location, all translations are ignored. (Homogeneous Vector)

v : Vec

The 3D vector to transform.

m : RigidMatrix

The transformation matrix.

Returns: Vec

matrixA *** matrixB

Full Usage: matrixA *** matrixB

Parameters:
    matrixA : RigidMatrix - The first matrix (applied first).
    matrixB : RigidMatrix - The second matrix (applied second).

Returns: RigidMatrix
Modifiers: inline

Multiplies matrixA with matrixB. The resulting transformation will first do matrixA and then matrixB.

matrixA : RigidMatrix

The first matrix (applied first).

matrixB : RigidMatrix

The second matrix (applied second).

Returns: RigidMatrix

RigidMatrix.Identity

Full Usage: RigidMatrix.Identity

Returns: RigidMatrix

Returns the Identity RigidMatrix:

 1  0  0  0
 0  1  0  0
 0  0  1  0

Returns: RigidMatrix

RigidMatrix.addTranslation v m

Full Usage: RigidMatrix.addTranslation v m

Parameters:
    v : Vec - The translation vector to add.
    m : RigidMatrix - The input matrix.

Returns: RigidMatrix

Adds a vector translation to an existing RigidMatrix.

v : Vec

The translation vector to add.

m : RigidMatrix

The input matrix.

Returns: RigidMatrix

RigidMatrix.addTranslationXYZ x y z m

Full Usage: RigidMatrix.addTranslationXYZ x y z m

Parameters:
    x : float - The X translation to add.
    y : float - The Y translation to add.
    z : float - The Z translation to add.
    m : RigidMatrix - The input matrix.

Returns: RigidMatrix

Adds an X, Y and Z translation to an existing RigidMatrix.

x : float

The X translation to add.

y : float

The Y translation to add.

z : float

The Z translation to add.

m : RigidMatrix

The input matrix.

Returns: RigidMatrix

RigidMatrix.andThen next m

Full Usage: RigidMatrix.andThen next m

Parameters:
Returns: RigidMatrix A new RigidMatrix that transforms like m followed by next.
Modifiers: inline

Combines two transformations for use in a pipeline: 'm |> RigidMatrix.andThen next' first does m and then next. Same as m.Then next and RigidMatrix.multiply(m, next).

next : RigidMatrix

The RigidMatrix applied second.

m : RigidMatrix

The RigidMatrix applied first.

Returns: RigidMatrix

A new RigidMatrix that transforms like m followed by next.

RigidMatrix.asFSharpCode m

Full Usage: RigidMatrix.asFSharpCode m

Parameters:
Returns: string
Modifiers: inline

Formats a RigidMatrix into an F# code string that can be used to recreate the matrix.

m : RigidMatrix
Returns: string

RigidMatrix.asString m

Full Usage: RigidMatrix.asString m

Parameters:
Returns: string
Modifiers: inline

Nicely formats the Matrix to a Grid of 4x3.

m : RigidMatrix
Returns: string

RigidMatrix.columnVector1 m

Full Usage: RigidMatrix.columnVector1 m

Parameters:
Returns: Vec
Modifiers: inline

Returns the first column vector. M11, M12 and M13.

m : RigidMatrix
Returns: Vec

RigidMatrix.columnVector2 m

Full Usage: RigidMatrix.columnVector2 m

Parameters:
Returns: Vec
Modifiers: inline

Returns the second column vector. M21, M22 and M23.

m : RigidMatrix
Returns: Vec

RigidMatrix.columnVector3 m

Full Usage: RigidMatrix.columnVector3 m

Parameters:
Returns: Vec
Modifiers: inline

Returns the third column vector. M31, M32 and M33.

m : RigidMatrix
Returns: Vec

RigidMatrix.create (m11, m21, m31, x41, m12, m22, m32, y42, m13, m23, m33, z43)

Full Usage: RigidMatrix.create (m11, m21, m31, x41, m12, m22, m32, y42, m13, m23, m33, z43)

Parameters:
    m11 : float
    m21 : float
    m31 : float
    x41 : float
    m12 : float
    m22 : float
    m32 : float
    y42 : float
    m13 : float
    m23 : float
    m33 : float
    z43 : float

Returns: RigidMatrix

Creates an immutable 4x3 Transformation Matrix. Checks the input values to ensure they form a valid RigidMatrix. This Constructor takes arguments in row-major order:

M11 M21 M31 X41 M12 M22 M32 Y42 M13 M23 M33 Z43
Where X41, Y42 and Z43 refer to the translation part of the RigidMatrix.

m11 : float
m21 : float
m31 : float
x41 : float
m12 : float
m22 : float
m32 : float
y42 : float
m13 : float
m23 : float
m33 : float
z43 : float
Returns: RigidMatrix

RigidMatrix.createFromMatrix m

Full Usage: RigidMatrix.createFromMatrix m

Parameters:
    m : Matrix - The general 4x4 matrix to convert.

Returns: RigidMatrix

Tries to create a 3x4 RigidMatrix from a general 4x4 matrix. Fails if the input matrix does scale, shear, flip, mirror, reflect or project. However, translation is allowed.

m : Matrix

The general 4x4 matrix to convert.

Returns: RigidMatrix

RigidMatrix.createFromQuaternion quaternion

Full Usage: RigidMatrix.createFromQuaternion quaternion

Parameters:
    quaternion : Quaternion - The quaternion representing the rotation.

Returns: RigidMatrix

Create a RigidMatrix from a Quaternion.

quaternion : Quaternion

The quaternion representing the rotation.

Returns: RigidMatrix

RigidMatrix.createPlaneToPlane fromPlane toPlane

Full Usage: RigidMatrix.createPlaneToPlane fromPlane toPlane

Parameters:
    fromPlane : PPlane - The source plane.
    toPlane : PPlane - The target plane.

Returns: RigidMatrix

Creates a RigidMatrix to transform from one Plane or Coordinate System to another Plane.

fromPlane : PPlane

The source plane.

toPlane : PPlane

The target plane.

Returns: RigidMatrix

RigidMatrix.createRotationFromDegreesUnitVec axis angleDegrees

Full Usage: RigidMatrix.createRotationFromDegreesUnitVec axis angleDegrees

Parameters:
    axis : UnitVec - Rotation axis, as unit-vector.
    angleDegrees : float - Rotation angle in degrees.

Returns: RigidMatrix

Creates a rotation around an Axis RigidMatrix. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

axis : UnitVec

Rotation axis, as unit-vector.

angleDegrees : float

Rotation angle in degrees.

Returns: RigidMatrix

RigidMatrix.createRotationFromDegreesUnitVecAround cen axis angleDegrees

Full Usage: RigidMatrix.createRotationFromDegreesUnitVecAround cen axis angleDegrees

Parameters:
    cen : Pnt - The center point for the rotation.
    axis : UnitVec - Rotation axis, a unit-vector.
    angleDegrees : float - Rotation angle in degrees.

Returns: RigidMatrix

Creates a rotation matrix around an Axis at a given center point. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

cen : Pnt

The center point for the rotation.

axis : UnitVec

Rotation axis, a unit-vector.

angleDegrees : float

Rotation angle in degrees.

Returns: RigidMatrix

RigidMatrix.createRotationFromDegreesVec axis angleDegrees

Full Usage: RigidMatrix.createRotationFromDegreesVec axis angleDegrees

Parameters:
    axis : Vec - Rotation axis, a vector of any length but 0.0.
    angleDegrees : float - Rotation angle in degrees.

Returns: RigidMatrix

Creates a rotation around an Axis RigidMatrix. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

axis : Vec

Rotation axis, a vector of any length but 0.0.

angleDegrees : float

Rotation angle in degrees.

Returns: RigidMatrix

RigidMatrix.createRotationFromDegreesVecAround cen axis angleDegrees

Full Usage: RigidMatrix.createRotationFromDegreesVecAround cen axis angleDegrees

Parameters:
    cen : Pnt - The center point for the rotation.
    axis : Vec - Rotation axis, a vector of any length but 0.0.
    angleDegrees : float - Rotation angle in degrees.

Returns: RigidMatrix

Creates a rotation matrix around an Axis at a given center point. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

cen : Pnt

The center point for the rotation.

axis : Vec

Rotation axis, a vector of any length but 0.0.

angleDegrees : float

Rotation angle in degrees.

Returns: RigidMatrix

RigidMatrix.createRotationFromRadiansUnitVec axis angleRadians

Full Usage: RigidMatrix.createRotationFromRadiansUnitVec axis angleRadians

Parameters:
    axis : UnitVec - Rotation axis, as unit-vector.
    angleRadians : float - Rotation angle in radians.

Returns: RigidMatrix

Creates a rotation around an Axis RigidMatrix. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

axis : UnitVec

Rotation axis, as unit-vector.

angleRadians : float

Rotation angle in radians.

Returns: RigidMatrix

RigidMatrix.createRotationFromRadiansUnitVecAround cen axis angleRadians

Full Usage: RigidMatrix.createRotationFromRadiansUnitVecAround cen axis angleRadians

Parameters:
    cen : Pnt - The center point for the rotation.
    axis : UnitVec - Rotation axis, a unit-vector.
    angleRadians : float - Rotation angle in radians.

Returns: RigidMatrix

Creates a rotation matrix around an Axis at a given center point. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

cen : Pnt

The center point for the rotation.

axis : UnitVec

Rotation axis, a unit-vector.

angleRadians : float

Rotation angle in radians.

Returns: RigidMatrix

RigidMatrix.createRotationFromRadiansVec axis angleRadians

Full Usage: RigidMatrix.createRotationFromRadiansVec axis angleRadians

Parameters:
    axis : Vec - Rotation axis, a vector of any length but 0.0.
    angleRadians : float - Rotation angle in radians.

Returns: RigidMatrix

Creates a rotation around an Axis RigidMatrix. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

axis : Vec

Rotation axis, a vector of any length but 0.0.

angleRadians : float

Rotation angle in radians.

Returns: RigidMatrix

RigidMatrix.createRotationFromRadiansVecAround cen axis angleRadians

Full Usage: RigidMatrix.createRotationFromRadiansVecAround cen axis angleRadians

Parameters:
    cen : Pnt - The center point for the rotation.
    axis : Vec - Rotation axis, a vector of any length but 0.0.
    angleRadians : float - Rotation angle in radians.

Returns: RigidMatrix

Creates a rotation matrix around an Axis at a given center point. A positive angle rotates counter-clockwise when the axis vector is pointing towards the observer (right-hand rule).

cen : Pnt

The center point for the rotation.

axis : Vec

Rotation axis, a vector of any length but 0.0.

angleRadians : float

Rotation angle in radians.

Returns: RigidMatrix

RigidMatrix.createRotationFromUnitVecs vecFrom vecTo

Full Usage: RigidMatrix.createRotationFromUnitVecs vecFrom vecTo

Parameters:
    vecFrom : UnitVec - The source unit-vector direction.
    vecTo : UnitVec - The target unit-vector direction.

Returns: RigidMatrix

Creates a rotation from one unit-vector's direction to another unit-vector's direction. If the tips of the two unitized vectors have a distance less than 1e-12 the identity matrix is returned. If the tips of the two vectors are almost exactly opposite, that is if tips of the two vectors are less than 1e-12 apart when summed, there is no valid unique 180 degree rotation that can be found, so an exception is raised.

vecFrom : UnitVec

The source unit-vector direction.

vecTo : UnitVec

The target unit-vector direction.

Returns: RigidMatrix

RigidMatrix.createRotationFromVecs vecFrom vecTo

Full Usage: RigidMatrix.createRotationFromVecs vecFrom vecTo

Parameters:
    vecFrom : Vec - The source vector direction.
    vecTo : Vec - The target vector direction.

Returns: RigidMatrix

Creates a rotation from one vector's direction to another vector's direction. If the tips of the two unitized vectors have a distance less than 1e-12 the identity matrix is returned. If the tips of the two vectors are almost exactly opposite, that is if tips of the two vectors are less than 1e-12 apart when summed, there is no valid unique 180 degree rotation that can be found, so an exception is raised. Fails if either vector is too short (length less than 1e-6).

vecFrom : Vec

The source vector direction.

vecTo : Vec

The target vector direction.

Returns: RigidMatrix

RigidMatrix.createRotationXDegrees angleDegrees

Full Usage: RigidMatrix.createRotationXDegrees angleDegrees

Parameters:
    angleDegrees : float - Rotation angle in degrees.

Returns: RigidMatrix

Creates a rotation around the X-axis RigidMatrix by angle in degrees (not radians). A positive rotation will be from Y towards Z-axis, so counter-clockwise when the X-axis vector is pointing towards the observer. (right-hand rule) The resulting RigidMatrix will be:

 1 0      0        0
 0 cos(θ) -sin(θ)  0
 0 sin(θ) cos(θ)   0
val cos: value: 'T -> 'T (requires member Cos)
val sin: value: 'T -> 'T (requires member Sin)

angleDegrees : float

Rotation angle in degrees.

Returns: RigidMatrix

RigidMatrix.createRotationXRadians angleRadians

Full Usage: RigidMatrix.createRotationXRadians angleRadians

Parameters:
    angleRadians : float - Rotation angle in radians.

Returns: RigidMatrix

Creates a rotation around the X-axis RigidMatrix by angle in radians (not degrees). A positive rotation will be from Y towards Z-axis, so counter-clockwise when the X-axis vector is pointing towards the observer. (right-hand rule) The resulting RigidMatrix will be:

 1 0      0        0
 0 cos(θ) -sin(θ)  0
 0 sin(θ) cos(θ)   0
val cos: value: 'T -> 'T (requires member Cos)
val sin: value: 'T -> 'T (requires member Sin)

angleRadians : float

Rotation angle in radians.

Returns: RigidMatrix

RigidMatrix.createRotationYDegrees angleDegrees

Full Usage: RigidMatrix.createRotationYDegrees angleDegrees

Parameters:
    angleDegrees : float - Rotation angle in degrees.

Returns: RigidMatrix

Creates a rotation around the Y-axis RigidMatrix by angle in degrees (not radians). A positive rotation will be from Z towards X-axis, so counter-clockwise when the Y-axis vector is pointing towards the observer. (right-hand rule) The resulting RigidMatrix will be:

 cos(θ)  0 sin(θ) 0
 0       1 0      0
 -sin(θ) 0 cos(θ) 0
val cos: value: 'T -> 'T (requires member Cos)
val sin: value: 'T -> 'T (requires member Sin)

angleDegrees : float

Rotation angle in degrees.

Returns: RigidMatrix

RigidMatrix.createRotationYRadians angleRadians

Full Usage: RigidMatrix.createRotationYRadians angleRadians

Parameters:
    angleRadians : float - Rotation angle in radians.

Returns: RigidMatrix

Creates a rotation around the Y-axis RigidMatrix by angle in radians (not degrees). A positive rotation will be from Z towards X-axis, so counter-clockwise when the Y-axis vector is pointing towards the observer. (right-hand rule) The resulting RigidMatrix will be:

 cos(θ)  0 sin(θ) 0
 0       1 0      0
 -sin(θ) 0 cos(θ) 0
val cos: value: 'T -> 'T (requires member Cos)
val sin: value: 'T -> 'T (requires member Sin)

angleRadians : float

Rotation angle in radians.

Returns: RigidMatrix

RigidMatrix.createRotationZDegrees angleDegrees

Full Usage: RigidMatrix.createRotationZDegrees angleDegrees

Parameters:
    angleDegrees : float - Rotation angle in degrees.

Returns: RigidMatrix

Creates a rotation around the Z-axis RigidMatrix by angle in degrees (not radians). A positive rotation will be from X towards Y-axis, so counter-clockwise when the Z-axis vector is pointing towards the observer. (right-hand rule) The resulting RigidMatrix will be:

 cos(θ) -sin(θ) 0 0
 sin(θ) cos(θ)  0 0
 0      0       1 0
val cos: value: 'T -> 'T (requires member Cos)
val sin: value: 'T -> 'T (requires member Sin)

angleDegrees : float

Rotation angle in degrees.

Returns: RigidMatrix

RigidMatrix.createRotationZRadians angleRadians

Full Usage: RigidMatrix.createRotationZRadians angleRadians

Parameters:
    angleRadians : float - Rotation angle in radians.

Returns: RigidMatrix

Creates a rotation around the Z-axis RigidMatrix by angle in radians (not degrees). A positive rotation will be from X towards Y-axis, so counter-clockwise when the Z-axis vector is pointing towards the observer. (right-hand rule) The resulting RigidMatrix will be:

 cos(θ) -sin(θ) 0 0
 sin(θ) cos(θ)  0 0
 0      0       1 0
val cos: value: 'T -> 'T (requires member Cos)
val sin: value: 'T -> 'T (requires member Sin)

angleRadians : float

Rotation angle in radians.

Returns: RigidMatrix

RigidMatrix.createToPlane p

Full Usage: RigidMatrix.createToPlane p

Parameters:
    p : PPlane - The target plane.

Returns: RigidMatrix

Creates a RigidMatrix to transform from World plane or Coordinate System to given Plane. Also called Change of Basis.

p : PPlane

The target plane.

Returns: RigidMatrix

RigidMatrix.createTranslation v

Full Usage: RigidMatrix.createTranslation v

Parameters:
    v : Vec - The vector by which to translate.

Returns: RigidMatrix

Creates a translation RigidMatrix. The resulting RigidMatrix will be:

 1  0  0  v.X
 0  1  0  v.Y
 0  0  1  v.Z

v : Vec

The vector by which to translate.

Returns: RigidMatrix

RigidMatrix.createTranslationX x

Full Usage: RigidMatrix.createTranslationX x

Parameters:
    x : float - The amount by which to translate in X-axis.

Returns: RigidMatrix

Creates a translation RigidMatrix. The resulting RigidMatrix will be:

 1  0  0  x
 0  1  0  0
 0  0  1  0

x : float

The amount by which to translate in X-axis.

Returns: RigidMatrix

RigidMatrix.createTranslationXYZ x y z

Full Usage: RigidMatrix.createTranslationXYZ x y z

Parameters:
    x : float - The amount to translate in the X-axis.
    y : float - The amount to translate in the Y-axis.
    z : float - The amount to translate in the Z-axis.

Returns: RigidMatrix

Creates a translation RigidMatrix. The resulting matrix will be:

 1  0  0  x
 0  1  0  y
 0  0  1  z

x : float

The amount to translate in the X-axis.

y : float

The amount to translate in the Y-axis.

z : float

The amount to translate in the Z-axis.

Returns: RigidMatrix

RigidMatrix.createTranslationY y

Full Usage: RigidMatrix.createTranslationY y

Parameters:
    y : float - The amount by which to translate in Y-axis.

Returns: RigidMatrix

Creates a translation RigidMatrix. The resulting RigidMatrix will be:

 1  0  0  0
 0  1  0  y
 0  0  1  0

y : float

The amount by which to translate in Y-axis.

Returns: RigidMatrix

RigidMatrix.createTranslationZ z

Full Usage: RigidMatrix.createTranslationZ z

Parameters:
    z : float - The amount by which to translate in Z-axis.

Returns: RigidMatrix

Creates a translation RigidMatrix. The resulting RigidMatrix will be:

 1  0  0  0
 0  1  0  0
 0  0  1  z

z : float

The amount by which to translate in Z-axis.

Returns: RigidMatrix

RigidMatrix.equalsExact a b

Full Usage: RigidMatrix.equalsExact a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two matrices are exactly equal. Compares each field with the = operator, so a NaN value is never equal.

a : RigidMatrix
b : RigidMatrix
Returns: bool

RigidMatrix.equalsWithin tol a b

Full Usage: RigidMatrix.equalsWithin tol a b

Parameters:
    tol : float - The tolerance for comparing each matrix element.
    a : RigidMatrix - The first matrix.
    b : RigidMatrix - The second matrix.

Returns: bool

Checks if two Matrices are equal within tolerance. By comparing the fields M11 to Z43 each with the given tolerance. Use RigidMatrix.equalsExact to check for an exact match.

tol : float

The tolerance for comparing each matrix element.

a : RigidMatrix

The first matrix.

b : RigidMatrix

The second matrix.

Returns: bool

RigidMatrix.inverse m

Full Usage: RigidMatrix.inverse m

Parameters:
Returns: RigidMatrix
Modifiers: inline

Inverts the RigidMatrix. A RigidMatrix can always be inverted. (as opposed to a general Matrix)

m : RigidMatrix

The matrix to invert.

Returns: RigidMatrix

RigidMatrix.isIdentity m

Full Usage: RigidMatrix.isIdentity m

Parameters:
Returns: bool
Modifiers: inline

Checks if the Matrix is an Identity Matrix in the form of:

 1  0  0  0
 0  1  0  0
 0  0  1  0
Using an approximate tolerance of 1e-6.

m : RigidMatrix
Returns: bool

RigidMatrix.multiply (matrixA, matrixB)

Full Usage: RigidMatrix.multiply (matrixA, matrixB)

Parameters:
    matrixA : RigidMatrix - The first matrix (applied first).
    matrixB : RigidMatrix - The second matrix (applied second).

Returns: RigidMatrix

Multiplies matrixA with matrixB. The resulting transformation will first do matrixA and then matrixB.

matrixA : RigidMatrix

The first matrix (applied first).

matrixB : RigidMatrix

The second matrix (applied second).

Returns: RigidMatrix

RigidMatrix.removeTranslation m

Full Usage: RigidMatrix.removeTranslation m

Parameters:
Returns: RigidMatrix

Removes the translation part by setting X41, Y42 and Z43 to 0.0.

m : RigidMatrix

The input matrix.

Returns: RigidMatrix

RigidMatrix.toArrayByColumns m

Full Usage: RigidMatrix.toArrayByColumns m

Parameters:
Returns: float array
Modifiers: inline

Returns the 12 elements column-major order:

[| M11 M12 M13 M21 M22 M23 M31 M32 M33 X41 Y42 Z43 |]
Where X41, Y42 and Z43 refer to the translation part of the RigidMatrix.

m : RigidMatrix
Returns: float array

RigidMatrix.toArrayByRows m

Full Usage: RigidMatrix.toArrayByRows m

Parameters:
Returns: float array
Modifiers: inline

Returns the 12 elements in row-major order:

[| M11 M21 M31 X41 M12 M22 M32 Y42 M13 M23 M33 Z43 |]
Where X41, Y42 and Z43 refer to the translation part of the RigidMatrix.

m : RigidMatrix
Returns: float array

RigidMatrix.transformPntXYZ x y z m

Full Usage: RigidMatrix.transformPntXYZ x y z m

Parameters:
    x : float - The X component of the 3D point to transform.
    y : float - The Y component of the 3D point to transform.
    z : float - The Z component of the 3D point to transform.
    m : RigidMatrix - The transformation matrix.

Returns: Pnt
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D point.

x : float

The X component of the 3D point to transform.

y : float

The Y component of the 3D point to transform.

z : float

The Z component of the 3D point to transform.

m : RigidMatrix

The transformation matrix.

Returns: Pnt

RigidMatrix.transformVecXYZ x y z m

Full Usage: RigidMatrix.transformVecXYZ x y z m

Parameters:
    x : float - The X component of the 3D vector to transform.
    y : float - The Y component of the 3D vector to transform.
    z : float - The Z component of the 3D vector to transform.
    m : RigidMatrix - The transformation matrix.

Returns: Vec
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D vector. Since a 3D vector represents a direction or translation in space, but not a location, all translations are ignored. (Homogeneous Vector)

x : float

The X component of the 3D vector to transform.

y : float

The Y component of the 3D vector to transform.

z : float

The Z component of the 3D vector to transform.

m : RigidMatrix

The transformation matrix.

Returns: Vec

RigidMatrix.translation m

Full Usage: RigidMatrix.translation m

Parameters:
Returns: Vec
Modifiers: inline

Returns the translation or fourth column vector. X41, Y42 and Z43.

m : RigidMatrix
Returns: Vec

RigidMatrix.tryCreateFromMatrix m

Full Usage: RigidMatrix.tryCreateFromMatrix m

Parameters:
    m : Matrix - The general 4x4 matrix to convert.

Returns: RigidMatrix voption

Tries to create a 3x4 RigidMatrix from a general 4x4 matrix. Returns ValueNone if the input matrix does scale, shear, flip, mirror, reflect or project. However, translation is allowed.

m : Matrix

The general 4x4 matrix to convert.

Returns: RigidMatrix voption

Type something to start searching.