AnyCAD Rapid API 2024
Help you to create a better world!
|
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.GXY | ( | ) |
Creates XY object with zero coordinates (0,0).
GXY.GXY | ( | double | theX, |
double | theY ) |
a number pair defined by the XY coordinates
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()
Computes the sum of this number pair and number pair theOther new.X() = <me>.X() + theOther.X() new.Y() = <me>.Y() + theOther.Y()
void GXY.Coord | ( | double[] | theX, |
double[] | theY ) |
For this number pair, returns its coordinates X and Y.
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}.
double GXY.Crossed | ( | GXY | theOther | ) |
double D = <me>.X() * theOther.Y() - <me>.Y() * theOther.X()
double GXY.CrossMagnitude | ( | GXY | theRight | ) |
computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||
double GXY.CrossSquareMagnitude | ( | GXY | theRight | ) |
computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2
void GXY.Divide | ( | double | theScalar | ) |
divides <me> by a real.
GXY GXY.Divided | ( | double | theScalar | ) |
Divides <me> by a real.
double GXY.Dot | ( | GXY | theOther | ) |
Computes the scalar product between <me> and theOther
boolean GXY.IsEqual | ( | GXY | theOther, |
double | theTolerance ) |
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 | theScalar | ) |
New.X() = <me>.X() * theScalar; New.Y() = <me>.Y() * theScalar;
new.X() = <me>.X() * theOther.X(); new.Y() = <me>.Y() * theOther.Y();
void GXY.Multiply | ( | double | theScalar | ) |
<me>.X() = <me>.X() * theScalar; <me>.Y() = <me>.Y() * theScalar;
void GXY.Multiply | ( | GMat2d | theMatrix | ) |
<me> = theMatrix * <me>
void GXY.Multiply | ( | GXY | theOther | ) |
<me>.X() = <me>.X() * theOther.X(); <me>.Y() = <me>.Y() * theOther.Y();
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 | ( | double | theX, |
double | theY ) |
For this number pair, assigns the values theX and theY to its coordinates
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}.
Computes the following linear combination and assigns the result to this number pair: theA1 * theXY1 + theA2 * theXY2
– Computes the following linear combination and assigns the result to this number pair: theA1 * theXY1 + theA2 * theXY2 + theXY3
Computes the following linear combination and assigns the result to this number pair: theA1 * theXY1 + theXY2
Computes the following linear combination and assigns the result to this number pair: theXY1 + theXY2
void GXY.SetX | ( | double | theX | ) |
Assigns the given value to the X coordinate of this number pair.
void GXY.SetY | ( | double | theY | ) |
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 | theOther | ) |
<me>.X() = <me>.X() - theOther.X() <me>.Y() = <me>.Y() - theOther.Y()
new.X() = <me>.X() - theOther.X() new.Y() = <me>.Y() - theOther.Y()
double GXY.X | ( | ) |
Returns the X coordinate of this number pair.
double GXY.Y | ( | ) |
Returns the Y coordinate of this number pair.