[mxcad_3d API Document](../README. md)/Mx3dGetTrsf
Class: Mx3dGeTrsf 
Representing geometric transformations
Hierarchy 
- ↳ - Mx3dGeTrsf
Table of contents 
Constructors 
Methods 
- Invert
- Inverted
- IsNegative
- Multiplied
- Multiply
- Power
- Powered
- PreMultiply
- ScaleFactor
- SetMirrorByAxis
- SetMirrorByCSYSR
- SetMirrorByPoint
- SetRotation
- SetScale
- SetScaleFactor
- SetTranslationBy2Points
- SetTranslationByVec
- SetTranslationPart
- SetValues
- Transforms
- Value
Constructors 
constructor 
• new Mx3dGeTrsf()
Overrides 
Mx3dGeObject.constructor
Methods 
Invert 
▸ Invert(): void
Transpose the transformation matrix
Returns 
void
Inverted 
▸ Inverted(): Mx3dGeTrsf
Obtain the transposed matrix of the transformation matrix
Returns 
Transpose matrix
IsNegative 
▸ IsNegative(): boolean
Determine whether the determinant of this transformation matrix is negative
Returns 
boolean
Is it negative
Multiplied 
▸ Multiplied(t): Mx3dGeTrsf
Obtain the result of matrix multiplication, [res]=[me] * t, where [res] represents the result, [me] represents itself, and t is another transformation matrix
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Another transformation matrix | 
Returns 
The result of matrix multiplication
Multiply 
▸ Multiply(t): void
Multiplying oneself by another transformation matrix, [me]=[me] * t, where [me] represents oneself and t is another transformation matrix
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Another transformation matrix | 
Returns 
void
Power 
▸ Power(n): void
Perform a power n operation on oneself, [me] * [me] *.... * [me], where [me] represents oneself and is multiplied n times
Parameters 
| Name | Type | Description | 
|---|---|---|
| N | number | times | 
Returns 
void
Powered 
▸ Powered(n): Mx3dGeTrsf
Obtain the result of the nth power operation of the current transformation matrix, [res]=[me] * [me] *.... * [me], where [res] represents the result, [me] represents itself, and n [me] are multiplied
Parameters 
| Name | Type | Description | 
|---|---|---|
| N | number | times | 
Returns 
The result to the power of n
PreMultiply 
▸ PreMultiply(t): void
Another transformation matrix multiplied by itself, [me]=t * [me], [me] represents itself, and t is another transformation matrix
Parameters 
| Name | Type | Description | 
|---|---|---|
| T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Another transformation matrix | 
Returns 
void
ScaleFactor 
▸ ScaleFactor(): number
Obtain the scaling ratio of the transformation
Returns 
number
Scale ratio
SetMirrorByAxis 
▸ SetMirrorByAxis(axis): void
Set up axis mirroring transformation
Parameters 
| Name | Type | Description | 
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Mirror Axis | 
Returns 
void
SetMirrorByCSYSR 
▸ SetMirrorByCSYSR(csysr): void
Set up a coordinate system mirror transformation, where the mirror plane is the XOY plane of the coordinate system
Parameters 
| Name | Type | Description | 
|---|---|---|
| Csysr | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Mirror coordinate system | 
Returns 
void
SetMirrorByPoint 
▸ SetMirrorByPoint(point): void
Set up point mirror transformation
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point | UniPoint | Mirror Point | 
Returns 
void
SetRotation 
▸ SetRotation(axis, ang): void
Set the transformation to rotate a certain angle according to the axis
Parameters 
| Name | Type | Description | 
|---|---|---|
| Axis | [Mx3dGeAxis] (Mx3dGeAxis. md) | Rotation axis | 
| 'ang' | 'number' | Rotation angle | 
Returns 
void
SetScale 
▸ SetScale(point, s): void
Set up scaling transformation based on points and a certain proportion
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point | UniPoint | Zoom Point | 
| S | number | scaling ratio | 
Returns 
void
SetScaleFactor 
▸ SetScaleFactor(s): void
Set zoom ratio
Parameters 
| Name | Type | Description | 
|---|---|---|
| S | number | scaling ratio | 
Returns 
void
SetTranslationBy2Points 
▸ SetTranslationBy2Points(point1, point2): void
Set the translation transformation of the vector formed by subtracting the endpoint from the starting point
Parameters 
| Name | Type | Description | 
|---|---|---|
| Point1 | UniPoint | Starting Point | 
| Point2 | UniPoint | Endpoint | 
Returns 
void
SetTranslationByVec 
▸ SetTranslationByVec(vec): void
Set the translation transformation according to the vector, with the direction and distance of the movement being the direction and magnitude of the vector, respectively
Parameters 
| Name | Type | Description | 
|---|---|---|
| Vec | UniVec | Vector | 
Returns 
void
SetTranslationPart 
▸ SetTranslationPart(vec): void
Set up separate translation transformations based on vectors
Parameters 
| Name | Type | Description | 
|---|---|---|
| Vec | [Mx3dGeVec] (Mx3dGeVec. md) | Vector | 
Returns 
void
SetValues 
▸ SetValues(a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34): void
Set affine transformation matrix other than translation transformation
Parameters 
| Name | Type | Description | 
|---|---|---|
| A11 | number | Line 1, Column 1 | 
| A12 | number | Line 1, Column 2 | 
| A13 | number | Line 1, Column 3 | 
| A14 | number | Line 1, Column 4 | 
| A21 | number | 2nd row, 1st column | 
| A22 | number | 2nd row, 2nd column | 
| A23 | number | 2nd row, 3rd column | 
| A24 | number | 2nd row, 4th column | 
| A31 | number | Line 3, Column 1 | 
| A32 | number | Line 3, Column 2 | 
| A33 | number | Line 3, Column 3 | 
| A34 | Number | Row 3, Column 4 | 
Returns 
void
Transforms 
▸ Transforms(x, y, z): void
Transform a point using the current transformation matrix. The parameters are referenced and will be modified by the function
Parameters 
| Name | Type | 
|---|---|
| x | number | 
| y | number | 
| z | number | 
Returns 
void
Value 
▸ Value(row, col): number
Retrieve the element values of the specified row and column in the transformation matrix
Parameters 
| Name | Type | Description | 
|---|---|---|
| Row | number | row | 
| Col | number | column | 
Returns 
number
Element value