This class represents 2D transformation
matrices that define affine ( translation, rotation, and/or scaling
) transformations.
Inheritance Hierarchy
SystemObject
SystemValueType
Teigha.GeometryMatrix2d
Namespace: Teigha.Geometry
Assembly: TD_Mgd (in TD_Mgd.dll) Version:
25.3.0.0
Syntax
public struct Matrix2d : IFormattable
Public Structure Matrix2d
Implements IFormattable
public value class Matrix2d : IFormattable
[<SealedAttribute>]
type Matrix2d =
struct
inherit ValueType
interface IFormattable
end
The Matrix2d type exposes the
following members.
Constructors
|
Name |
Description |
|
Matrix2d
|
Constructor for the Matrix2d class. Creates a matrix with
elements taken from the passed array. |
Top
Properties
Methods
|
Name |
Description |

|
AlignCoordinateSystem
|
Returns the matrix that maps the coordinate system defined by
the fromOrigin origin and the fromE0 and fromE1 axes, to the
coordinate system defined by the toOrigin origin and the toE0 and
toE1 axes. |

|
Displacement
|
Returns the displacement (translation) matrix by the specified
vector. |
|
Equals
|
Checks objects for equality.
(Overrides ValueTypeEquals(Object)) |
|
GetDeterminant
|
Returns the determinant of this matrix. |
|
GetHashCode
|
Retrieves the object hash code.
(Overrides ValueTypeGetHashCode) |
|
GetScale
|
Returns the scale factor of this matrix. The scale factor is
the square root of the longest column vector of the linear part of
this matrix. |
|
GetType
|
Gets the Type of the current
instance.
(Inherited from Object) |
|
Inverse
|
Returns the inverse of this matrix. |
|
IsConformal
|
Checks whether this matrix is conformal (isUniScaledOrtho()),
and returns the matrix information that contains the scale factor,
angle of rotation, the presence of a mirror component to the
matrix, and the direction of reflection. |
|
IsEqualTo(Matrix2d)
|
Checks whether this matrix is equal to the passed matrix. |
|
IsEqualTo(Matrix2d,
Tolerance)
|
Checks whether this matrix is equal to the passed matrix
according to the specified tolerance. |
|
IsScaledOrtho
|
Checks whether the column vectors of the linear part of this
matrix are perpendicular to each other. |
|
IsScaledOrtho(Tolerance)
|
Checks whether the column vectors of the linear part of this
matrix are perpendicular to each other according to the specified
tolerance. |
|
IsSingular
|
Checks whether this matrix is singular. |
|
IsSingular(Tolerance)
|
Checks whether this matrix is singular according to the
specified tolerance. |
|
IsUniscaledOrtho
|
Checks whether the column vectors of the linear part of this
matrix are of equal length and perpendicular to each other. |
|
IsUniscaledOrtho(Tolerance)
|
Checks whether the column vectors of the linear part of this
matrix are of equal length and perpendicular to each other
according to the specified tolerance. |

|
Mirroring(Line2d)
|
Returns the matrix that mirrors about the specified line. |

|
Mirroring(Point2d)
|
Returns the matrix that mirrors about the specified point. |
|
Multiply
|
Multiplies the specified matrix with this matrix. This method
is identical to the PreMultiplyBy method which sets this matrix to
the product of matrix * (this matrix). |
|
PostMultiplyBy
|
Sets this matrix to the product of (this matrix) * rightSide
and returns the resulting matrix. |
|
PreMultiplyBy
|
Sets this matrix to the product of leftSide * (this matrix) and
returns the resulting matrix. |

|
Rotation
|
Returns the matrix that rotates by angle about the center. |

|
Scaling
|
Returns the matrix that scales by a scale factor about the
center. |
|
ToArray
|
Returns an array that contains matrix elements. Matrix elements
are assigned by rows (data11, data12 ... data33). The resulting
array contains nine elements. |
|
ToString
|
Returns a string representation of this matrix.
(Overrides ValueTypeToString) |
|
ToString(IFormatProvider)
|
Returns an equivalent string representation of this
object. |
|
ToString(String,
IFormatProvider)
|
Returns an equivalent string representation of this
object. |
|
Transpose
|
Returns the transpose of this matrix. |
Top
Operators
Remarks
Matrix2d may be
viewed as an array[3][3] of doubles. A Matrix2d, M, can be
expressed as a 3 by 3 matrix, in the form
a00 a01 t0
a10 a11 t1
0 0 1
The linear part of M is the matrix
a00 a01
a10 a11
The translational part of M is the column
t0
t1
The origin of the coordinate system of M is (t0, t1).
See Also