AnyCAD Rapid SDK  2020
The Rapid CAD SDK
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GPnt2d Class Reference

Public Member Functions

synchronized void delete ()
 GPnt2d ()
 GPnt2d (GXY Coord)
 GPnt2d (double Xp, double Yp)
void SetCoord (int Index, double Xi)
void SetCoord (double Xp, double Yp)
void SetX (double X)
void SetY (double Y)
void SetXY (GXY Coord)
double Coord (int Index)
void Coord (double[] Xp, double[] Yp)
double X ()
double Y ()
GXY Coord ()
GXY ChangeCoord ()
boolean IsEqual (GPnt2d Other, double LinearTolerance)
double Distance (GPnt2d Other)
double SquareDistance (GPnt2d Other)
void Mirror (GPnt2d P)
GPnt2d Mirrored (GPnt2d P)
void Mirror (GAx2d A)
GPnt2d Mirrored (GAx2d A)
void Rotate (GPnt2d P, double Ang)
GPnt2d Rotated (GPnt2d P, double Ang)
void Scale (GPnt2d P, double S)
GPnt2d Scaled (GPnt2d P, double S)
void Transform (GTrsf2d T)
GPnt2d Transformed (GTrsf2d T)
void Translate (GVec2d V)
GPnt2d Translated (GVec2d V)
void Translate (GPnt2d P1, GPnt2d P2)
GPnt2d Translated (GPnt2d P1, GPnt2d P2)

Protected Member Functions

 GPnt2d (long cPtr, boolean cMemoryOwn)
void finalize ()

Static Protected Member Functions

static long getCPtr (GPnt2d obj)

Protected Attributes

transient boolean swigCMemOwn

Detailed Description

Defines a non-persistent 2D cartesian point.

Constructor & Destructor Documentation

GPnt2d.GPnt2d ( )

Creates a point with zero coordinates.

GPnt2d.GPnt2d ( GXY  Coord)

Creates a point with a doublet of coordinates.

GPnt2d.GPnt2d ( double  Xp,
double  Yp 

Creates a point with its 2 cartesian's coordinates : Xp, Yp.

Member Function Documentation

GXY GPnt2d.ChangeCoord ( )

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

double GPnt2d.Coord ( int  Index)

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

void GPnt2d.Coord ( double[]  Xp,
double[]  Yp 

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

GXY GPnt2d.Coord ( )

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

double GPnt2d.Distance ( GPnt2d  Other)

Computes the distance between two points.

boolean GPnt2d.IsEqual ( GPnt2d  Other,
double  LinearTolerance 

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

void GPnt2d.Mirror ( GPnt2d  P)

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

GPnt2d GPnt2d.Mirrored ( GPnt2d  P)

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

GPnt2d GPnt2d.Mirrored ( GAx2d  A)

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

GPnt2d GPnt2d.Rotated ( GPnt2d  P,
double  Ang 

Scales a point. S is the scaling value.

GPnt2d GPnt2d.Scaled ( GPnt2d  P,
double  S 

Transforms a point with the transformation T.

void GPnt2d.SetCoord ( int  Index,
double  Xi 

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

void GPnt2d.SetCoord ( double  Xp,
double  Yp 

For this point, assigns the values Xp and Yp to its two coordinates

void GPnt2d.SetX ( double  X)

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

void GPnt2d.SetXY ( GXY  Coord)

Assigns the two coordinates of Coord to this point.

void GPnt2d.SetY ( double  Y)

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

double GPnt2d.SquareDistance ( GPnt2d  Other)

Computes the square distance between two points.

GPnt2d GPnt2d.Transformed ( GTrsf2d  T)

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

GPnt2d GPnt2d.Translated ( GVec2d  V)

Translates a point from the point P1 to the point P2.

double GPnt2d.X ( )

For this point, returns its X coordinate.

GXY GPnt2d.XY ( )

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

double GPnt2d.Y ( )

For this point, returns its Y coordinate.