Skip to content

[mxcad_3d API Document](../README. md)/Mx3dGetTrsf

Class: Mx3dGeTrsf ​

Representing geometric transformations

Hierarchy ​

Table of contents ​

Constructors ​

Methods ​

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 ​

Mx3dGeTrsf

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 ​

NameTypeDescription
T[Mx3dGetStrf] (Mx3dGetStrf. md)Another transformation matrix

Returns ​

Mx3dGeTrsf

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 ​

NameTypeDescription
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 ​

NameTypeDescription
Nnumbertimes

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 ​

NameTypeDescription
Nnumbertimes

Returns ​

Mx3dGeTrsf

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 ​

NameTypeDescription
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 ​

NameTypeDescription
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 ​

NameTypeDescription
Csysr[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Mirror coordinate system

Returns ​

void


SetMirrorByPoint ​

▸ SetMirrorByPoint(point): void

Set up point mirror transformation

Parameters ​

NameTypeDescription
PointUniPointMirror Point

Returns ​

void


SetRotation ​

▸ SetRotation(axis, ang): void

Set the transformation to rotate a certain angle according to the axis

Parameters ​

NameTypeDescription
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 ​

NameTypeDescription
PointUniPointZoom Point
Snumberscaling ratio

Returns ​

void


SetScaleFactor ​

▸ SetScaleFactor(s): void

Set zoom ratio

Parameters ​

NameTypeDescription
Snumberscaling 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 ​

NameTypeDescription
Point1UniPointStarting Point
Point2UniPointEndpoint

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 ​

NameTypeDescription
VecUniVecVector

Returns ​

void


SetTranslationPart ​

▸ SetTranslationPart(vec): void

Set up separate translation transformations based on vectors

Parameters ​

NameTypeDescription
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 ​

NameTypeDescription
A11numberLine 1, Column 1
A12numberLine 1, Column 2
A13numberLine 1, Column 3
A14numberLine 1, Column 4
A21number2nd row, 1st column
A22number2nd row, 2nd column
A23number2nd row, 3rd column
A24number2nd row, 4th column
A31numberLine 3, Column 1
A32numberLine 3, Column 2
A33numberLine 3, Column 3
A34NumberRow 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 ​

NameType
xnumber
ynumber
znumber

Returns ​

void


Value ​

▸ Value(row, col): number

Retrieve the element values of the specified row and column in the transformation matrix

Parameters ​

NameTypeDescription
Rownumberrow
Colnumbercolumn

Returns ​

number

Element value