OpenLexocad
28.0
|
#include <XYZ.h>
Public Member Functions | |
XYZ () | |
creates an indefinite XYZ. More... | |
XYZ (const double X, const double Y, const double Z) | |
modification of the XYZ coordinates More... | |
void | setCoord (const double X, const double Y, const double Z) |
void | setCoord (const int Index, const double Xi) |
void | setX (const double X) |
Assigns the given value to the X coordinate of this number triple. More... | |
void | setY (const double Y) |
Assigns the given value to the Y coordinate of this number triple. More... | |
void | setZ (const double Z) |
Assigns the given value to ther Z coordinate of this number triple. More... | |
double | coord (const int Index) const |
void | coord (double &X, double &Y, double &Z) const |
double | x () const |
Returns the X, Y, or Z coordinate of this number triple. More... | |
double | y () const |
Returns the X, Y, or Z coordinate of this number triple. More... | |
double | z () const |
Returns the X, Y, or Z coordinate of this number triple. More... | |
double | modulus () const |
computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this number triple. More... | |
double | squareModulus () const |
Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this number triple. More... | |
bool | isEqual (const XYZ &Other, const double Tolerance) const |
void | add (const XYZ &Other) |
void | operator+= (const XYZ &Other) |
XYZ | added (const XYZ &Other) const |
XYZ | operator+ (const XYZ &Other) const |
void | cross (const XYZ &Right) |
void | operator^= (const XYZ &Right) |
XYZ | crossed (const XYZ &Right) const |
XYZ | operator^ (const XYZ &Right) const |
double | crossMagnitude (const XYZ &Right) const |
double | crossSquareMagnitude (const XYZ &Right) const |
void | crossCross (const XYZ &Coord1, const XYZ &Coord2) |
XYZ | crossCrossed (const XYZ &Coord1, const XYZ &Coord2) const |
void | divide (const double Scalar) |
divides <me> by a real. More... | |
void | operator/= (const double Scalar) |
XYZ | divided (const double Scalar) const |
divides <me> by a real. More... | |
XYZ | operator/ (const double Scalar) const |
double | dot (const XYZ &Other) const |
computes the scalar product between <me> and Other More... | |
double | operator* (const XYZ &Other) const |
double | dotCross (const XYZ &Coord1, const XYZ &Coord2) const |
computes the triple scalar product. More... | |
void | multiply (const double Scalar) |
void | operator*= (const double Scalar) |
void | multiply (const XYZ &Other) |
void | operator*= (const XYZ &Other) |
void | multiply (const Geom::Mat &Matrix) |
void | operator*= (const Geom::Mat &Matrix) |
XYZ | multiplied (const double Scalar) const |
<me> = Matrix * <me> More... | |
XYZ | operator* (const double Scalar) const |
XYZ | multiplied (const XYZ &Other) const |
XYZ | multiplied (const Geom::Mat &Matrix) const |
New = Matrix * <me> More... | |
XYZ | operator* (const Geom::Mat &Matrix) const |
void | normalize () |
XYZ | normalized () const |
void | reverse () |
XYZ | reversed () const |
void | subtract (const XYZ &Right) |
void | operator-= (const XYZ &Right) |
XYZ | subtracted (const XYZ &Right) const |
XYZ | operator- (const XYZ &Right) const |
void | setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2, const double A3, const XYZ &XYZ3, const XYZ &XYZ4) |
void | setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2, const double A3, const XYZ &XYZ3) |
void | setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2, const XYZ &XYZ3) |
void | setLinearForm (const double A1, const XYZ &XYZ1, const double A2, const XYZ &XYZ2) |
void | setLinearForm (const double A1, const XYZ &XYZ1, const XYZ &XYZ2) |
void | setLinearForm (const XYZ &Left, const XYZ &Right) |
double & | operator[] (int i) |
const double & | operator[] (int i) const |
bool | operator< (const XYZ &rhs) const |
This class describes a Cartesian coordinate entity in
3D space {X,Y,Z}. This class is non-persistent. 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.
Geom::XYZ::XYZ | ( | ) |
creates an indefinite XYZ.
Geom::XYZ::XYZ | ( | const double | X, |
const double | Y, | ||
const double | Z | ||
) |
modification of the XYZ coordinates
void Geom::XYZ::add | ( | const XYZ & | Other | ) |
double Geom::XYZ::coord | ( | const int | Index | ) | const |
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 Geom::XYZ::coord | ( | double & | X, |
double & | Y, | ||
double & | Z | ||
) | const |
void Geom::XYZ::cross | ( | const XYZ & | Right | ) |
Triple vector product
Computes <me> = <me>.Cross(Coord1.Cross(Coord2))
Triple vector product
computes New = <me>.Cross(Coord1.Cross(Coord2))
double Geom::XYZ::crossMagnitude | ( | const XYZ & | Right | ) | const |
Computes the magnitude of the cross product between <me> and
Right. Returns || <me> ^ Right ||
double Geom::XYZ::crossSquareMagnitude | ( | const XYZ & | Right | ) | const |
Computes the square magnitude of the cross product between <me> and
Right. Returns || <me> ^ Right ||**2
void Geom::XYZ::divide | ( | const double | Scalar | ) |
divides <me> by a real.
XYZ Geom::XYZ::divided | ( | const double | Scalar | ) | const |
divides <me> by a real.
double Geom::XYZ::dot | ( | const XYZ & | Other | ) | const |
computes the scalar product between <me> and Other
computes the triple scalar product.
bool Geom::XYZ::isEqual | ( | const XYZ & | Other, |
const double | Tolerance | ||
) | const |
double Geom::XYZ::modulus | ( | ) | const |
computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this number triple.
XYZ Geom::XYZ::multiplied | ( | const double | Scalar | ) | const |
void Geom::XYZ::multiply | ( | const double | Scalar | ) |
void Geom::XYZ::multiply | ( | const Geom::Mat & | Matrix | ) |
void Geom::XYZ::multiply | ( | const XYZ & | Other | ) |
void Geom::XYZ::normalize | ( | ) |
XYZ Geom::XYZ::normalized | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool Geom::XYZ::operator< | ( | const XYZ & | rhs | ) | const |
double& Geom::XYZ::operator[] | ( | int | i | ) |
const double& Geom::XYZ::operator[] | ( | int | i | ) | const |
|
inline |
void Geom::XYZ::setCoord | ( | const double | X, |
const double | Y, | ||
const double | Z | ||
) |
For this number triple, assigns
the values X, Y and Z to its three coordinates
void Geom::XYZ::setCoord | ( | const int | Index, |
const 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 Geom::XYZ::setLinearForm | ( | const double | A1, |
const XYZ & | XYZ1, | ||
const double | A2, | ||
const XYZ & | XYZ2 | ||
) |
<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2
void Geom::XYZ::setLinearForm | ( | const double | A1, |
const XYZ & | XYZ1, | ||
const double | A2, | ||
const XYZ & | XYZ2, | ||
const double | A3, | ||
const XYZ & | XYZ3 | ||
) |
<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3
void Geom::XYZ::setLinearForm | ( | const double | A1, |
const XYZ & | XYZ1, | ||
const double | A2, | ||
const XYZ & | XYZ2, | ||
const double | A3, | ||
const XYZ & | XYZ3, | ||
const XYZ & | XYZ4 | ||
) |
<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4
void Geom::XYZ::setLinearForm | ( | const double | A1, |
const XYZ & | XYZ1, | ||
const double | A2, | ||
const XYZ & | XYZ2, | ||
const XYZ & | XYZ3 | ||
) |
<me> is setted to the following linear form :
A1 * XYZ1 + A2 * XYZ2 + XYZ3
<me> is setted to the following linear form :
A1 * XYZ1 + XYZ2
void Geom::XYZ::setX | ( | const double | X | ) |
Assigns the given value to the X coordinate of this number triple.
void Geom::XYZ::setY | ( | const double | Y | ) |
Assigns the given value to the Y coordinate of this number triple.
void Geom::XYZ::setZ | ( | const double | Z | ) |
Assigns the given value to ther Z coordinate of this number triple.
double Geom::XYZ::squareModulus | ( | ) | const |
Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this number triple.
void Geom::XYZ::subtract | ( | const XYZ & | Right | ) |
double Geom::XYZ::x | ( | ) | const |
Returns the X, Y, or Z coordinate of this number triple.
double Geom::XYZ::y | ( | ) | const |
Returns the X, Y, or Z coordinate of this number triple.
double Geom::XYZ::z | ( | ) | const |
Returns the X, Y, or Z coordinate of this number triple.