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

Public Member Functions

synchronized void delete ()
 
 GXY ()
 
 GXY (double X, double Y)
 
void SetCoord (int Index, double Xi)
 
void SetCoord (double X, double Y)
 
void SetX (double X)
 
void SetY (double Y)
 
double Coord (int Index)
 
void Coord (double[] X, double[] Y)
 
double X ()
 
double Y ()
 
double Modulus ()
 
double SquareModulus ()
 
boolean IsEqual (GXY Other, double Tolerance)
 
void Add (GXY Other)
 
GXY Added (GXY Other)
 
double Crossed (GXY Right)
 
double CrossMagnitude (GXY Right)
 
double CrossSquareMagnitude (GXY Right)
 
void Divide (double Scalar)
 
GXY Divided (double Scalar)
 
double Dot (GXY Other)
 
void Multiply (double Scalar)
 
void Multiply (GXY Other)
 
void Multiply (GMat2d Matrix)
 
GXY Multiplied (double Scalar)
 
GXY Multiplied (GXY Other)
 
GXY Multiplied (GMat2d Matrix)
 
void Normalize ()
 
GXY Normalized ()
 
void Reverse ()
 
GXY Reversed ()
 
void SetLinearForm (double A1, GXY XY1, double A2, GXY XY2)
 
void SetLinearForm (double A1, GXY XY1, double A2, GXY XY2, GXY XY3)
 
void SetLinearForm (double A1, GXY XY1, GXY XY2)
 
void SetLinearForm (GXY XY1, GXY XY2)
 
void Subtract (GXY Right)
 
GXY Subtracted (GXY Right)
 

Protected Member Functions

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

Static Protected Member Functions

static long getCPtr (GXY obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

This class describes a cartesian coordinate entity in 2D space {X,Y}. This class is non persistent. This entity used for algebraic calculation. An XY can be transformed with a Trsf2d or a GTrsf2d from package gp. It is used in vectorial computations or for holding this type of information in data structures.

Constructor & Destructor Documentation

GXY.GXY ( )

Creates XY object with zero coordinates (0,0).

GXY.GXY ( double  X,
double  Y 
)

a number pair defined by the XY coordinates

Member Function Documentation

void GXY.Add ( GXY  Other)

Computes the sum of this number pair and number pair Other <me>.X() = <me>.X() + Other.X() <me>.Y() = <me>.Y() + Other.Y()

GXY GXY.Added ( GXY  Other)

Computes the sum of this number pair and number pair Other new.X() = <me>.X() + Other.X() new.Y() = <me>.Y() + Other.Y()

double GXY.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 GXY.Coord ( double[]  X,
double[]  Y 
)

For this number pair, returns its coordinates X and Y.

double GXY.Crossed ( GXY  Right)

Real D = <me>.X() * Other.Y() - <me>.Y() * Other.X()

double GXY.CrossMagnitude ( GXY  Right)

computes the magnitude of the cross product between <me> and Right. Returns || <me> ^ Right ||

double GXY.CrossSquareMagnitude ( GXY  Right)

computes the square magnitude of the cross product between <me> and Right. Returns || <me> ^ Right ||**2

void GXY.Divide ( double  Scalar)

divides <me> by a real.

GXY GXY.Divided ( double  Scalar)

Divides <me> by a real.

double GXY.Dot ( GXY  Other)

Computes the scalar product between <me> and Other

boolean GXY.IsEqual ( GXY  Other,
double  Tolerance 
)

Returns true if the coordinates of this number pair are equal to the respective coordinates of the number pair Other, within the specified tolerance Tolerance. I.e.: abs(<me>.X() - Other.X()) <= Tolerance and abs(<me>.Y() - Other.Y()) <= Tolerance and computations

double GXY.Modulus ( )

Computes Sqrt (X*X + Y*Y) where X and Y are the two coordinates of this number pair.

GXY GXY.Multiplied ( double  Scalar)

New.X() = <me>.X() * Scalar; New.Y() = <me>.Y() * Scalar;

GXY GXY.Multiplied ( GXY  Other)

new.X() = <me>.X() * Other.X(); new.Y() = <me>.Y() * Other.Y();

GXY GXY.Multiplied ( GMat2d  Matrix)

New = Matrix * <me>

void GXY.Multiply ( double  Scalar)

<me>.X() = <me>.X() * Scalar; <me>.Y() = <me>.Y() * Scalar;

void GXY.Multiply ( GXY  Other)

<me>.X() = <me>.X() * Other.X(); <me>.Y() = <me>.Y() * Other.Y();

void GXY.Multiply ( GMat2d  Matrix)

<me> = Matrix * <me>

void GXY.Normalize ( )

<me>.X() = <me>.X()/ <me>.Modulus() <me>.Y() = <me>.Y()/ <me>.Modulus() Raises ConstructionError if <me>.Modulus() <= Resolution from gp

GXY GXY.Normalized ( )

New.X() = <me>.X()/ <me>.Modulus() New.Y() = <me>.Y()/ <me>.Modulus() Raises ConstructionError if <me>.Modulus() <= Resolution from gp

void GXY.Reverse ( )

<me>.X() = -<me>.X() <me>.Y() = -<me>.Y()

GXY GXY.Reversed ( )

New.X() = -<me>.X() New.Y() = -<me>.Y()

void GXY.SetCoord ( int  Index,
double  Xi 
)

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

void GXY.SetCoord ( double  X,
double  Y 
)

For this number pair, assigns the values X and Y to its coordinates

void GXY.SetLinearForm ( double  A1,
GXY  XY1,
double  A2,
GXY  XY2 
)

Computes the following linear combination and assigns the result to this number pair: A1 * XY1 + A2 * XY2

void GXY.SetLinearForm ( double  A1,
GXY  XY1,
double  A2,
GXY  XY2,
GXY  XY3 
)

– Computes the following linear combination and assigns the result to this number pair: A1 * XY1 + A2 * XY2 + XY3

void GXY.SetLinearForm ( double  A1,
GXY  XY1,
GXY  XY2 
)

Computes the following linear combination and assigns the result to this number pair: A1 * XY1 + XY2

void GXY.SetLinearForm ( GXY  XY1,
GXY  XY2 
)

Computes the following linear combination and assigns the result to this number pair: XY1 + XY2

void GXY.SetX ( double  X)

Assigns the given value to the X coordinate of this number pair.

void GXY.SetY ( double  Y)

Assigns the given value to the Y coordinate of this number pair.

double GXY.SquareModulus ( )

Computes X*X + Y*Y where X and Y are the two coordinates of this number pair.

void GXY.Subtract ( GXY  Right)

<me>.X() = <me>.X() - Other.X() <me>.Y() = <me>.Y() - Other.Y()

GXY GXY.Subtracted ( GXY  Right)

new.X() = <me>.X() - Other.X() new.Y() = <me>.Y() - Other.Y()

double GXY.X ( )

Returns the X coordinate of this number pair.

double GXY.Y ( )

Returns the Y coordinate of this number pair.