AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
GTrsf2d类 参考

Public 成员函数

 GTrsf2d ()
 
 GTrsf2d (GTrsf theT)
 
void SetMirror (GPnt2d theP)
 
void SetMirror (GAx2d theA)
 
void SetRotation (GPnt2d theP, double theAng)
 
void SetScale (GPnt2d theP, double theS)
 
void SetTransformation (GAx2d theFromSystem1, GAx2d theToSystem2)
 
void SetTransformation (GAx2d theToSystem)
 
void SetTranslation (GVec2d theV)
 
void SetTranslation (GPnt2d theP1, GPnt2d theP2)
 
void SetTranslationPart (GVec2d theV)
 
void SetScaleFactor (double theS)
 
boolean IsNegative ()
 
GTrsfForm Form ()
 
double ScaleFactor ()
 
GXY TranslationPart ()
 
GMat2d VectorialPart ()
 
GMat2d HVectorialPart ()
 
double RotationPart ()
 
double Value (int theRow, int theCol)
 
void Invert ()
 
GTrsf2d Inverted ()
 
GTrsf2d Multiplied (GTrsf2d theT)
 
void Multiply (GTrsf2d theT)
 
void PreMultiply (GTrsf2d theT)
 
void Power (int theN)
 
GTrsf2d Powered (int theN)
 
void Transforms (double[] theX, double[] theY)
 
void Transforms (GXY theCoord)
 
void SetValues (double a11, double a12, double a13, double a21, double a22, double a23)
 

详细描述

Defines a non-persistent transformation in 2D space. The following transformations are implemented : - Translation, Rotation, Scale - Symmetry with respect to a point and a line. Complex transformations can be obtained by combining the previous elementary transformations using the method Multiply. The transformations can be represented as follow : V1 V2 T XY XY | a11 a12 a13 | | x | | x'| | a21 a22 a23 | | y | | y'| | 0 0 1 | | 1 | | 1 | where {V1, V2} defines the vectorial part of the transformation and T defines the translation part of the transformation. This transformation never change the nature of the objects.

构造及析构函数说明

◆ GTrsf2d() [1/2]

GTrsf2d.GTrsf2d ( )

Returns identity transformation.

◆ GTrsf2d() [2/2]

GTrsf2d.GTrsf2d ( GTrsf theT)

Creates a 2d transformation in the XY plane from a 3d transformation .

成员函数说明

◆ Form()

GTrsfForm GTrsf2d.Form ( )

Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror (relative to a point or an axis), a scaling transformation, or a compound transformation.

◆ HVectorialPart()

GMat2d GTrsf2d.HVectorialPart ( )

Returns the homogeneous vectorial part of the transformation. It is a 2*2 matrix which doesn't include the scale factor. The coefficients of this matrix must be multiplied by the scale factor to obtain the coefficients of the transformation.

◆ Inverted()

GTrsf2d GTrsf2d.Inverted ( )

Computes the reverse transformation. Raises an exception if the matrix of the transformation is not inversible, it means that the scale factor is lower or equal to Resolution from package gp.

◆ IsNegative()

boolean GTrsf2d.IsNegative ( )

Returns true if the determinant of the vectorial part of this transformation is negative..

◆ Multiply()

void GTrsf2d.Multiply ( GTrsf2d theT)

Computes the transformation composed from <me> and theT. <me> = <me> * theT

◆ Powered()

GTrsf2d GTrsf2d.Powered ( int theN)

Computes the following composition of transformations <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.Inverse() *...........* <me>.Inverse(). Raises if theN < 0 and if the matrix of the transformation not inversible.

◆ PreMultiply()

void GTrsf2d.PreMultiply ( GTrsf2d theT)

Computes the transformation composed from <me> and theT. <me> = theT * <me>

◆ RotationPart()

double GTrsf2d.RotationPart ( )

Returns the angle corresponding to the rotational component of the transformation matrix (operation opposite to SetRotation()).

◆ ScaleFactor()

double GTrsf2d.ScaleFactor ( )

Returns the scale factor.

◆ SetMirror() [1/2]

void GTrsf2d.SetMirror ( GAx2d theA)

Changes the transformation into a symmetrical transformation. theA is the center of the axial symmetry.

◆ SetMirror() [2/2]

void GTrsf2d.SetMirror ( GPnt2d theP)

Changes the transformation into a symmetrical transformation. theP is the center of the symmetry.

◆ SetRotation()

void GTrsf2d.SetRotation ( GPnt2d theP,
double theAng )

Changes the transformation into a rotation. theP is the rotation's center and theAng is the angular value of the rotation in radian.

◆ SetScale()

void GTrsf2d.SetScale ( GPnt2d theP,
double theS )

Changes the transformation into a scale. theP is the center of the scale and theS is the scaling value.

◆ SetScaleFactor()

void GTrsf2d.SetScaleFactor ( double theS)

Modifies the scale factor.

◆ SetTransformation() [1/2]

void GTrsf2d.SetTransformation ( GAx2d theFromSystem1,
GAx2d theToSystem2 )

Changes a transformation allowing passage from the coordinate system "theFromSystem1" to the coordinate system "theToSystem2".

◆ SetTransformation() [2/2]

void GTrsf2d.SetTransformation ( GAx2d theToSystem)

Changes the transformation allowing passage from the basic coordinate system {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.)} to the local coordinate system defined with the Ax2d theToSystem.

◆ SetTranslation() [1/2]

void GTrsf2d.SetTranslation ( GPnt2d theP1,
GPnt2d theP2 )

Makes the transformation into a translation from the point theP1 to the point theP2.

◆ SetTranslation() [2/2]

void GTrsf2d.SetTranslation ( GVec2d theV)

Changes the transformation into a translation. theV is the vector of the translation.

◆ SetTranslationPart()

void GTrsf2d.SetTranslationPart ( GVec2d theV)

Replaces the translation vector with theV.

◆ SetValues()

void GTrsf2d.SetValues ( double a11,
double a12,
double a13,
double a21,
double a22,
double a23 )

Sets the coefficients of the transformation. The transformation of the point x,y is the point x',y' with : x' = a11 x + a12 y + a13 y' = a21 x + a22 y + a23 The method Value(i,j) will return aij. Raises ConstructionError if the determinant of the aij is null. If the matrix as not a uniform scale it will be orthogonalized before future using.

◆ Transforms()

void GTrsf2d.Transforms ( GXY theCoord)

Transforms a doublet XY with a Trsf2d

◆ TranslationPart()

GXY GTrsf2d.TranslationPart ( )

Returns the translation part of the transformation's matrix

◆ Value()

double GTrsf2d.Value ( int theRow,
int theCol )

Returns the coefficients of the transformation's matrix. It is a 2 rows * 3 columns matrix. Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3

◆ VectorialPart()

GMat2d GTrsf2d.VectorialPart ( )

Returns the vectorial part of the transformation. It is a 2*2 matrix which includes the scale factor.