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

Public 成员函数

 GXY ()
 
 GXY (double theX, double theY)
 
void SetCoord (int theIndex, double theXi)
 
void SetCoord (double theX, double theY)
 
void SetX (double theX)
 
void SetY (double theY)
 
double Coord (int theIndex)
 
void Coord (double[] theX, double[] theY)
 
double X ()
 
double Y ()
 
double Modulus ()
 
double SquareModulus ()
 
boolean IsEqual (GXY theOther, double theTolerance)
 
void Add (GXY theOther)
 
GXY Added (GXY theOther)
 
double Crossed (GXY theOther)
 
double CrossMagnitude (GXY theRight)
 
double CrossSquareMagnitude (GXY theRight)
 
void Divide (double theScalar)
 
GXY Divided (double theScalar)
 
double Dot (GXY theOther)
 
void Multiply (double theScalar)
 
void Multiply (GXY theOther)
 
void Multiply (GMat2d theMatrix)
 
GXY Multiplied (double theScalar)
 
GXY Multiplied (GXY theOther)
 
GXY Multiplied (GMat2d theMatrix)
 
void Normalize ()
 
GXY Normalized ()
 
void Reverse ()
 
GXY Reversed ()
 
void SetLinearForm (double theA1, GXY theXY1, double theA2, GXY theXY2)
 
void SetLinearForm (double theA1, GXY theXY1, double theA2, GXY theXY2, GXY theXY3)
 
void SetLinearForm (double theA1, GXY theXY1, GXY theXY2)
 
void SetLinearForm (GXY theXY1, GXY theXY2)
 
void Subtract (GXY theOther)
 
GXY Subtracted (GXY theOther)
 

详细描述

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.

构造及析构函数说明

◆ GXY() [1/2]

GXY.GXY ( )

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

◆ GXY() [2/2]

GXY.GXY ( double theX,
double theY )

a number pair defined by the XY coordinates

成员函数说明

◆ Add()

void GXY.Add ( GXY theOther)

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

◆ Added()

GXY GXY.Added ( GXY theOther)

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

◆ Coord() [1/2]

void GXY.Coord ( double[] theX,
double[] theY )

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

◆ Coord() [2/2]

double GXY.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}.

◆ Crossed()

double GXY.Crossed ( GXY theOther)

double D = <me>.X() * theOther.Y() - <me>.Y() * theOther.X()

◆ CrossMagnitude()

double GXY.CrossMagnitude ( GXY theRight)

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

◆ CrossSquareMagnitude()

double GXY.CrossSquareMagnitude ( GXY theRight)

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

◆ Divide()

void GXY.Divide ( double theScalar)

divides <me> by a real.

◆ Divided()

GXY GXY.Divided ( double theScalar)

Divides <me> by a real.

◆ Dot()

double GXY.Dot ( GXY theOther)

Computes the scalar product between <me> and theOther

◆ IsEqual()

boolean GXY.IsEqual ( GXY theOther,
double theTolerance )

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

◆ Modulus()

double GXY.Modulus ( )

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

◆ Multiplied() [1/3]

GXY GXY.Multiplied ( double theScalar)

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

◆ Multiplied() [2/3]

GXY GXY.Multiplied ( GMat2d theMatrix)

New = theMatrix * <me>

◆ Multiplied() [3/3]

GXY GXY.Multiplied ( GXY theOther)

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

◆ Multiply() [1/3]

void GXY.Multiply ( double theScalar)

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

◆ Multiply() [2/3]

void GXY.Multiply ( GMat2d theMatrix)

<me> = theMatrix * <me>

◆ Multiply() [3/3]

void GXY.Multiply ( GXY theOther)

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

◆ Normalize()

void GXY.Normalize ( )

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

◆ Normalized()

GXY GXY.Normalized ( )

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

◆ Reverse()

void GXY.Reverse ( )

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

◆ Reversed()

GXY GXY.Reversed ( )

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

◆ SetCoord() [1/2]

void GXY.SetCoord ( double theX,
double theY )

For this number pair, assigns the values theX and theY to its coordinates

◆ SetCoord() [2/2]

void GXY.SetCoord ( int theIndex,
double theXi )

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

◆ SetLinearForm() [1/4]

void GXY.SetLinearForm ( double theA1,
GXY theXY1,
double theA2,
GXY theXY2 )

Computes the following linear combination and assigns the result to this number pair: theA1 * theXY1 + theA2 * theXY2

◆ SetLinearForm() [2/4]

void GXY.SetLinearForm ( double theA1,
GXY theXY1,
double theA2,
GXY theXY2,
GXY theXY3 )

– Computes the following linear combination and assigns the result to this number pair: theA1 * theXY1 + theA2 * theXY2 + theXY3

◆ SetLinearForm() [3/4]

void GXY.SetLinearForm ( double theA1,
GXY theXY1,
GXY theXY2 )

Computes the following linear combination and assigns the result to this number pair: theA1 * theXY1 + theXY2

◆ SetLinearForm() [4/4]

void GXY.SetLinearForm ( GXY theXY1,
GXY theXY2 )

Computes the following linear combination and assigns the result to this number pair: theXY1 + theXY2

◆ SetX()

void GXY.SetX ( double theX)

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

◆ SetY()

void GXY.SetY ( double theY)

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

◆ SquareModulus()

double GXY.SquareModulus ( )

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

◆ Subtract()

void GXY.Subtract ( GXY theOther)

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

◆ Subtracted()

GXY GXY.Subtracted ( GXY theOther)

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

◆ X()

double GXY.X ( )

Returns the X coordinate of this number pair.

◆ Y()

double GXY.Y ( )

Returns the Y coordinate of this number pair.