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

Public Member Functions

synchronized void delete ()
 
 GXYZ ()
 
 GXYZ (double X, double Y, double Z)
 
void SetCoord (double X, double Y, double Z)
 
void SetCoord (int Index, double Xi)
 
void SetX (double X)
 
void SetY (double Y)
 
void SetZ (double Z)
 
double Coord (int Index)
 
void Coord (double[] X, double[] Y, double[] Z)
 
double X ()
 
double Y ()
 
double Z ()
 
double Modulus ()
 
double SquareModulus ()
 
boolean IsEqual (GXYZ Other, double Tolerance)
 
void Add (GXYZ Other)
 
GXYZ Added (GXYZ Other)
 
void Cross (GXYZ Right)
 
GXYZ Crossed (GXYZ Right)
 
double CrossMagnitude (GXYZ Right)
 
double CrossSquareMagnitude (GXYZ Right)
 
void CrossCross (GXYZ Coord1, GXYZ Coord2)
 
GXYZ CrossCrossed (GXYZ Coord1, GXYZ Coord2)
 
void Divide (double Scalar)
 
GXYZ Divided (double Scalar)
 
double Dot (GXYZ Other)
 
double DotCross (GXYZ Coord1, GXYZ Coord2)
 
void Multiply (double Scalar)
 
void Multiply (GXYZ Other)
 
void Multiply (GMat Matrix)
 
GXYZ Multiplied (double Scalar)
 
GXYZ Multiplied (GXYZ Other)
 
GXYZ Multiplied (GMat Matrix)
 
void Normalize ()
 
GXYZ Normalized ()
 
void Reverse ()
 
GXYZ Reversed ()
 
void Subtract (GXYZ Right)
 
GXYZ Subtracted (GXYZ Right)
 
void SetLinearForm (double A1, GXYZ XYZ1, double A2, GXYZ XYZ2, double A3, GXYZ XYZ3, GXYZ XYZ4)
 
void SetLinearForm (double A1, GXYZ XYZ1, double A2, GXYZ XYZ2, double A3, GXYZ XYZ3)
 
void SetLinearForm (double A1, GXYZ XYZ1, double A2, GXYZ XYZ2, GXYZ XYZ3)
 
void SetLinearForm (double A1, GXYZ XYZ1, double A2, GXYZ XYZ2)
 
void SetLinearForm (double A1, GXYZ XYZ1, GXYZ XYZ2)
 
void SetLinearForm (GXYZ XYZ1, GXYZ XYZ2)
 

Protected Member Functions

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

Static Protected Member Functions

static long getCPtr (GXYZ obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

This class describes a cartesian coordinate entity in 3D space {X,Y,Z}. This entity is used for algebraic calculation. This entity can be transformed with a "Trsf" or a "GTrsf" from package "gp". It is used in vectorial computations or for holding this type of information in data structures.

Constructor & Destructor Documentation

GXYZ.GXYZ ( )

Creates an XYZ object with zero co-ordinates (0,0,0)

GXYZ.GXYZ ( double  X,
double  Y,
double  Z 
)

creates an XYZ with given coordinates

Member Function Documentation

void GXYZ.Add ( GXYZ  Other)

<me>.X() = <me>.X() + Other.X() <me>.Y() = <me>.Y() + Other.Y() <me>.Z() = <me>.Z() + Other.Z()

GXYZ GXYZ.Added ( GXYZ  Other)

new.X() = <me>.X() + Other.X() new.Y() = <me>.Y() + Other.Y() new.Z() = <me>.Z() + Other.Z()

double GXYZ.Coord ( int  Index)

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

void GXYZ.Cross ( GXYZ  Right)

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

void GXYZ.CrossCross ( GXYZ  Coord1,
GXYZ  Coord2 
)

Triple vector product Computes <me> = <me>.Cross(Coord1.Cross(Coord2))

GXYZ GXYZ.CrossCrossed ( GXYZ  Coord1,
GXYZ  Coord2 
)

Triple vector product computes New = <me>.Cross(Coord1.Cross(Coord2))

GXYZ GXYZ.Crossed ( GXYZ  Right)

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

double GXYZ.CrossMagnitude ( GXYZ  Right)

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

double GXYZ.CrossSquareMagnitude ( GXYZ  Right)

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

void GXYZ.Divide ( double  Scalar)

divides <me> by a real.

GXYZ GXYZ.Divided ( double  Scalar)

divides <me> by a real.

double GXYZ.Dot ( GXYZ  Other)

computes the scalar product between <me> and Other

double GXYZ.DotCross ( GXYZ  Coord1,
GXYZ  Coord2 
)

computes the triple scalar product

boolean GXYZ.IsEqual ( GXYZ  Other,
double  Tolerance 
)

Returns True if he coordinates of this XYZ object are equal to the respective coordinates Other, within the specified tolerance Tolerance. I.e.: abs(<me>.X() - Other.X()) <= Tolerance and abs(<me>.Y() - Other.Y()) <= Tolerance and abs(<me>.Z() - Other.Z()) <= Tolerance.

double GXYZ.Modulus ( )

computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this XYZ object.

GXYZ GXYZ.Multiplied ( double  Scalar)

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

GXYZ GXYZ.Multiplied ( GXYZ  Other)

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

GXYZ GXYZ.Multiplied ( GMat  Matrix)

New = Matrix * <me>

void GXYZ.Multiply ( double  Scalar)

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

void GXYZ.Multiply ( GXYZ  Other)

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

void GXYZ.Multiply ( GMat  Matrix)

<me> = Matrix * <me>

void GXYZ.Normalize ( )

<me>.X() = <me>.X()/ <me>.Modulus() <me>.Y() = <me>.Y()/ <me>.Modulus() <me>.Z() = <me>.Z()/ <me>.Modulus() Raised if <me>.Modulus() <= Resolution from gp

GXYZ GXYZ.Normalized ( )

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

void GXYZ.Reverse ( )

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

GXYZ GXYZ.Reversed ( )

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

void GXYZ.SetCoord ( double  X,
double  Y,
double  Z 
)

For this XYZ object, assigns the values X, Y and Z to its three coordinates

void GXYZ.SetCoord ( int  Index,
double  Xi 
)

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

void GXYZ.SetLinearForm ( double  A1,
GXYZ  XYZ1,
double  A2,
GXYZ  XYZ2,
double  A3,
GXYZ  XYZ3,
GXYZ  XYZ4 
)

<me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4

void GXYZ.SetLinearForm ( double  A1,
GXYZ  XYZ1,
double  A2,
GXYZ  XYZ2,
double  A3,
GXYZ  XYZ3 
)

<me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3

void GXYZ.SetLinearForm ( double  A1,
GXYZ  XYZ1,
double  A2,
GXYZ  XYZ2,
GXYZ  XYZ3 
)

<me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + XYZ3

void GXYZ.SetLinearForm ( double  A1,
GXYZ  XYZ1,
double  A2,
GXYZ  XYZ2 
)

<me> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2

void GXYZ.SetLinearForm ( double  A1,
GXYZ  XYZ1,
GXYZ  XYZ2 
)

<me> is set to the following linear form : A1 * XYZ1 + XYZ2

void GXYZ.SetLinearForm ( GXYZ  XYZ1,
GXYZ  XYZ2 
)

<me> is set to the following linear form : XYZ1 + XYZ2

void GXYZ.SetX ( double  X)

Assigns the given value to the X coordinate

void GXYZ.SetY ( double  Y)

Assigns the given value to the Y coordinate

void GXYZ.SetZ ( double  Z)

Assigns the given value to the Z coordinate

double GXYZ.SquareModulus ( )

Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this XYZ object.

void GXYZ.Subtract ( GXYZ  Right)

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

GXYZ GXYZ.Subtracted ( GXYZ  Right)

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

double GXYZ.X ( )

Returns the X coordinate

double GXYZ.Y ( )

Returns the Y coordinate

double GXYZ.Z ( )

Returns the Z coordinate