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

Public 成员函数

 GPnt2d ()
 
 GPnt2d (GXY theCoord)
 
 GPnt2d (double theXp, double theYp)
 
void SetCoord (int theIndex, double theXi)
 
void SetCoord (double theXp, double theYp)
 
void SetX (double theX)
 
void SetY (double theY)
 
void SetXY (GXY theCoord)
 
double Coord (int theIndex)
 
void Coord (double[] theXp, double[] theYp)
 
double X ()
 
double Y ()
 
GXY XY ()
 
GXY Coord ()
 
GXY ChangeCoord ()
 
boolean IsEqual (GPnt2d theOther, double theLinearTolerance)
 
double Distance (GPnt2d theOther)
 
double SquareDistance (GPnt2d theOther)
 
void Mirror (GPnt2d theP)
 
GPnt2d Mirrored (GPnt2d theP)
 
void Mirror (GAx2d theA)
 
GPnt2d Mirrored (GAx2d theA)
 
void Rotate (GPnt2d theP, double theAng)
 
GPnt2d Rotated (GPnt2d theP, double theAng)
 
void Scale (GPnt2d theP, double theS)
 
GPnt2d Scaled (GPnt2d theP, double theS)
 
void Transform (GTrsf2d theT)
 
GPnt2d Transformed (GTrsf2d theT)
 
void Translate (GVec2d theV)
 
GPnt2d Translated (GVec2d theV)
 
void Translate (GPnt2d theP1, GPnt2d theP2)
 
GPnt2d Translated (GPnt2d theP1, GPnt2d theP2)
 

详细描述

Defines a non-persistent 2D cartesian point.

构造及析构函数说明

◆ GPnt2d() [1/3]

GPnt2d.GPnt2d ( )

Creates a point with zero coordinates.

◆ GPnt2d() [2/3]

GPnt2d.GPnt2d ( GXY theCoord)

Creates a point with a doublet of coordinates.

◆ GPnt2d() [3/3]

GPnt2d.GPnt2d ( double theXp,
double theYp )

Creates a point with its 2 cartesian's coordinates : theXp, theYp.

成员函数说明

◆ ChangeCoord()

GXY GPnt2d.ChangeCoord ( )

Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.

◆ Coord() [1/3]

GXY GPnt2d.Coord ( )

For this point, returns its two coordinates as a number pair.

◆ Coord() [2/3]

void GPnt2d.Coord ( double[] theXp,
double[] theYp )

For this point returns its two coordinates as a number pair.

◆ Coord() [3/3]

double GPnt2d.Coord ( int theIndex)

Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.

◆ Distance()

double GPnt2d.Distance ( GPnt2d theOther)

Computes the distance between two points.

◆ IsEqual()

boolean GPnt2d.IsEqual ( GPnt2d theOther,
double theLinearTolerance )

Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.

◆ Mirror()

void GPnt2d.Mirror ( GPnt2d theP)

Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.

◆ Mirrored()

GPnt2d GPnt2d.Mirrored ( GPnt2d theP)

Performs the symmetrical transformation of a point with respect to an axis placement which is the axis

◆ Rotate()

void GPnt2d.Rotate ( GPnt2d theP,
double theAng )

Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.

◆ Scale()

void GPnt2d.Scale ( GPnt2d theP,
double theS )

Scales a point. theS is the scaling value.

◆ SetCoord() [1/2]

void GPnt2d.SetCoord ( double theXp,
double theYp )

For this point, assigns the values theXp and theYp to its two coordinates

◆ SetCoord() [2/2]

void GPnt2d.SetCoord ( int theIndex,
double theXi )

Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.

◆ SetX()

void GPnt2d.SetX ( double theX)

Assigns the given value to the X coordinate of this point.

◆ SetXY()

void GPnt2d.SetXY ( GXY theCoord)

Assigns the two coordinates of Coord to this point.

◆ SetY()

void GPnt2d.SetY ( double theY)

Assigns the given value to the Y coordinate of this point.

◆ SquareDistance()

double GPnt2d.SquareDistance ( GPnt2d theOther)

Computes the square distance between two points.

◆ Transform()

void GPnt2d.Transform ( GTrsf2d theT)

Transforms a point with the transformation theT.

◆ Translate() [1/2]

void GPnt2d.Translate ( GPnt2d theP1,
GPnt2d theP2 )

Translates a point from the point theP1 to the point theP2.

◆ Translate() [2/2]

void GPnt2d.Translate ( GVec2d theV)

Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.

◆ X()

double GPnt2d.X ( )

For this point, returns its X coordinate.

◆ XY()

GXY GPnt2d.XY ( )

For this point, returns its two coordinates as a number pair.

◆ Y()

double GPnt2d.Y ( )

For this point, returns its Y coordinate.