OpenLexocad
27.0
|
#include <XY.h>
Public Member Functions | |
XY () | |
Creates an indefinite XY number pair. More... | |
XY (const double X, const double Y) | |
a number pair defined by the XY coordinates More... | |
void | add (const XY &Other) |
XY | added (const XY &Other) const |
double | coord (const int Index) const |
void | coord (double &X, double &Y) const |
For this number pair, returns its coordinates X and Y. More... | |
double | crossed (const XY &Right) const |
Real D = <me>.x() * Other.y() - <me>.y() * Other.x() More... | |
double | crossMagnitude (const XY &Right) const |
double | crossSquareMagnitude (const XY &Right) const |
void | divide (const double Scalar) |
divides <me> by a real. More... | |
XY | divided (const double Scalar) const |
Divides <me> by a real. More... | |
double | dot (const XY &Other) const |
Computes the scalar product between <me> and Other More... | |
bool | isEqual (const XY &Other, const double Tolerance) const |
double | modulus () const |
Computes Sqrt (x*x + y*y) where x and y are the two coordinates of this number pair. More... | |
XY | multiplied (const double Scalar) const |
XY | multiplied (const XY &Other) const |
XY | multiplied (const Mat2d &Matrix) const |
New = Matrix * <me> More... | |
void | multiply (const double Scalar) |
void | multiply (const XY &Other) |
void | multiply (const Mat2d &Matrix) |
<me> = Matrix * <me> More... | |
void | normalize () |
XY | normalized () const |
void | operator+= (const XY &Other) |
XY | operator+ (const XY &Other) const |
XY | operator- () const |
void | operator-= (const XY &Right) |
XY | operator- (const XY &Right) const |
XY | operator * (const Mat2d &Matrix) const |
double | operator * (const XY &Other) const |
void | operator *= (const double Scalar) |
void | operator *= (const XY &Other) |
void | operator *= (const Mat2d &Matrix) |
XY | operator * (const double Scalar) const |
void | operator/= (const double Scalar) |
XY | operator/ (const double Scalar) const |
double | operator^ (const XY &Right) const |
void | reverse () |
XY | reversed () const |
void | setCoord (const int Index, const double Xi) |
void | setCoord (const double X, const double Y) |
void | setLinearForm (const double A1, const XY &XY1, const double A2, const XY &XY2) |
void | setLinearForm (const double A1, const XY &XY1, const double A2, const XY &XY2, const XY &XY3) |
void | setLinearForm (const double A1, const XY &XY1, const XY &XY2) |
void | setLinearForm (const XY &XY1, const XY &XY2) |
void | setX (const double X) |
Assigns the given value to the X coordinate of this number pair. More... | |
void | setY (const double Y) |
Assigns the given value to the Y coordinate of this number pair. More... | |
double | squareModulus () const |
Computes x*x + y*y where x and y are the two coordinates of this number pair. More... | |
void | subtract (const XY &Right) |
XY | subtracted (const XY &Right) const |
double | x () const |
Returns the x coordinate of this number pair. More... | |
double | y () const |
Returns the y coordinate of this number pair. More... | |
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.
Geom::XY::XY | ( | ) |
Creates an indefinite XY number pair.
Geom::XY::XY | ( | const double | X, |
const double | Y | ||
) |
a number pair defined by the XY coordinates
void Geom::XY::add | ( | const XY & | Other | ) |
double Geom::XY::coord | ( | const int | Index | ) | const |
returns the coordinate of range Index :
Index = 1 => X is returned
Index = 2 => Y is returned
Raises OutOfRange if Index != {1, 2}.
void Geom::XY::coord | ( | double & | X, |
double & | Y | ||
) | const |
For this number pair, returns its coordinates X and Y.
double Geom::XY::crossed | ( | const XY & | Right | ) | const |
double Geom::XY::crossMagnitude | ( | const XY & | Right | ) | const |
computes the magnitude of the cross product between <me> and
Right. Returns || <me> ^ Right ||
double Geom::XY::crossSquareMagnitude | ( | const XY & | Right | ) | const |
computes the square magnitude of the cross product between <me> and
Right. Returns || <me> ^ Right ||**2
void Geom::XY::divide | ( | const double | Scalar | ) |
divides <me> by a real.
XY Geom::XY::divided | ( | const double | Scalar | ) | const |
Divides <me> by a real.
double Geom::XY::dot | ( | const XY & | Other | ) | const |
Computes the scalar product between <me> and Other
bool Geom::XY::isEqual | ( | const XY & | Other, |
const double | Tolerance | ||
) | const |
double Geom::XY::modulus | ( | ) | const |
Computes Sqrt (x*x + y*y) where x and y are the two coordinates of this number pair.
XY Geom::XY::multiplied | ( | const double | Scalar | ) | const |
void Geom::XY::multiply | ( | const double | Scalar | ) |
void Geom::XY::multiply | ( | const XY & | Other | ) |
void Geom::XY::multiply | ( | const Mat2d & | Matrix | ) |
<me> = Matrix * <me>
void Geom::XY::normalize | ( | ) |
XY Geom::XY::normalized | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Geom::XY::setCoord | ( | const int | Index, |
const 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 Geom::XY::setCoord | ( | const double | X, |
const double | Y | ||
) |
For this number pair, assigns
the values X and Y to its coordinates
Computes the following linear combination and
assigns the result to this number pair:
A1 * XY1 + A2 * XY2
void Geom::XY::setLinearForm | ( | const double | A1, |
const XY & | XY1, | ||
const double | A2, | ||
const XY & | XY2, | ||
const XY & | XY3 | ||
) |
– Computes the following linear combination and
assigns the result to this number pair:
A1 * XY1 + A2 * XY2 + XY3
Computes the following linear combination and
assigns the result to this number pair:
A1 * XY1 + XY2
Computes the following linear combination and
assigns the result to this number pair:
XY1 + XY2
void Geom::XY::setX | ( | const double | X | ) |
Assigns the given value to the X coordinate of this number pair.
void Geom::XY::setY | ( | const double | Y | ) |
Assigns the given value to the Y coordinate of this number pair.
double Geom::XY::squareModulus | ( | ) | const |
Computes x*x + y*y where x and y are the two coordinates of this number pair.
void Geom::XY::subtract | ( | const XY & | Right | ) |
double Geom::XY::x | ( | ) | const |
Returns the x coordinate of this number pair.
double Geom::XY::y | ( | ) | const |
Returns the y coordinate of this number pair.