OpenLexocad
28.0
|
Defines a non-persistent 3D Cartesian point.
More...
#include <Pnt.h>
Public Member Functions | |
Pnt () | |
Creates an indefinite point. More... | |
Pnt (const Geom::XYZ &Coord) | |
Creates a point with a triplet of coordinates. More... | |
Pnt (const double Xp, const double Yp, const double Zp=.0) | |
Creates a point with its 3 Cartesian's coordinates : Xp, Yp, Zp. More... | |
Pnt (const Pnt &rhs) | |
Copy constructor. More... | |
void | setCoord (const int Index, const double Xi) |
void | setCoord (const double Xp, const double Yp, const double Zp=.0) |
For this point, assigns the values Xp, Yp and Zp to its three coordinates. More... | |
void | setX (const double X) |
Assigns the given value to the X coordinate of this point. More... | |
void | setY (const double Y) |
Assigns the given value to the Y coordinate of this point. More... | |
void | setZ (const double Z) |
Assigns the given value to the Z coordinate of this point. More... | |
void | setXYZ (const Geom::XYZ &Coord) |
Assigns the three coordinates of Coord to this point. More... | |
double | coord (const int Index) const |
void | coord (double &Xp, double &Yp, double &Zp) const |
For this point gives its three coordinates Xp, Yp and Zp. More... | |
double | x () const |
For this point, returns its X coordinate. More... | |
double | y () const |
For this point, returns its X coordinate. More... | |
double | z () const |
For this point, returns its X coordinate. More... | |
float | fx () const |
float | fy () const |
float | fz () const |
const Geom::XYZ & | xyz () const |
For this point, returns its three coordinates as a number triple. More... | |
const Geom::XYZ & | coord () const |
For this point, returns its three coordinates as a number triple. More... | |
Geom::XYZ & | changeCoord () |
void | baryCenter (const double Alpha, const Pnt &P, const double Beta) |
bool | isEqual (const Pnt &Other, const double LinearTolerance) const |
double | distance (const Pnt &Other) const |
Computes the distance between two points. More... | |
double | squareDistance (const Pnt &Other) const |
Computes the square distance between two points. More... | |
void | mirror (const Pnt &P) |
Pnt | mirrored (const Pnt &P) const |
void | mirror (const Geom::Ax1 &A1) |
Pnt | mirrored (const Geom::Ax1 &A1) const |
void | mirror (const Geom::Ax2 &A2) |
Pnt | mirrored (const Geom::Ax2 &A2) const |
void | rotate (const Geom::Ax1 &A1, const double Ang) |
Pnt | rotated (const Geom::Ax1 &A1, const double Ang) const |
void | scale (const Pnt &P, const double S) |
Scales a point. S is the scaling value. More... | |
Pnt | scaled (const Pnt &P, const double S) const |
void | transform (const Geom::Trsf &T) |
Transforms a point with the transformation T. More... | |
Pnt | transformed (const Geom::Trsf &T) const |
void | translate (const Geom::Vec &V) |
Pnt | translated (const Geom::Vec &V) const |
Translates a point from the point P1 to the point P2. More... | |
void | translate (const Pnt &P1, const Pnt &P2) |
Pnt | translated (const Pnt &P1, const Pnt &P2) const |
bool | operator== (const Geom::Pnt &other) const |
Checks whether two points are equal within linear tolerance (default 1E-07) More... | |
bool | operator!= (const Geom::Pnt &other) const |
Checks whether two points are unequal within linear tolerance (default 1E-07) More... | |
double & | operator[] (int i) |
const double & | operator[] (int i) const |
Pnt | operator- (const Geom::Pnt &other) const |
Pnt | operator+ (const Geom::Pnt &other) const |
Pnt | operator* (const Geom::Pnt &other) const |
Pnt | operator* (double scalar) const |
bool | operator< (const Geom::Pnt &rhs) const |
Static Public Member Functions | |
static Pnt | ZeroPnt () |
Defines a non-persistent 3D Cartesian point.
Geom::Pnt::Pnt | ( | ) |
Creates an indefinite point.
Geom::Pnt::Pnt | ( | const Geom::XYZ & | Coord | ) |
Creates a point with a triplet of coordinates.
Geom::Pnt::Pnt | ( | const double | Xp, |
const double | Yp, | ||
const double | Zp = .0 |
||
) |
Creates a point with its 3 Cartesian's coordinates : Xp, Yp, Zp.
Geom::Pnt::Pnt | ( | const Pnt & | rhs | ) |
Copy constructor.
void Geom::Pnt::baryCenter | ( | const double | Alpha, |
const Pnt & | P, | ||
const double | Beta | ||
) |
Assigns the result of the following expression to this point
(Alpha*this + Beta*P) / (Alpha + Beta)
Geom::XYZ& Geom::Pnt::changeCoord | ( | ) |
Returns the coordinates of this point.
Note: This syntax allows direct modification of the returned value.
const Geom::XYZ& Geom::Pnt::coord | ( | ) | const |
For this point, returns its three coordinates as a number triple.
double Geom::Pnt::coord | ( | const int | Index | ) | const |
Returns the coordinate of corresponding to the value of Index :
Index = 1 => X is returned
Index = 2 => Y is returned
Index = 3 => Z is returned
Raises OutOfRange if Index != {1, 2, 3}.
//! Raised if Index != {1, 2, 3}.
void Geom::Pnt::coord | ( | double & | Xp, |
double & | Yp, | ||
double & | Zp | ||
) | const |
For this point gives its three coordinates Xp, Yp and Zp.
double Geom::Pnt::distance | ( | const Pnt & | Other | ) | const |
Computes the distance between two points.
float Geom::Pnt::fx | ( | ) | const |
float Geom::Pnt::fy | ( | ) | const |
float Geom::Pnt::fz | ( | ) | const |
bool Geom::Pnt::isEqual | ( | const Pnt & | Other, |
const double | LinearTolerance | ||
) | const |
Comparison
Returns True if the distance between the two points is
lower or equal to LinearTolerance.
void Geom::Pnt::mirror | ( | const Geom::Ax1 & | A1 | ) |
void Geom::Pnt::mirror | ( | const Geom::Ax2 & | A2 | ) |
void Geom::Pnt::mirror | ( | const Pnt & | P | ) |
Performs the symmetrical transformation of a point
with respect to the point P which is the center of
the symmetry.
Performs the symmetrical transformation of a point
with respect to a plane. The axis placement A2 locates
the plane of the symmetry : (Location, XDirection, YDirection).
Rotates a point. A1 is the axis of the rotation.
Ang is the angular value of the rotation in radians.
Performs the symmetrical transformation of a point
with respect to an axis placement which is the axis
of the symmetry.
bool Geom::Pnt::operator!= | ( | const Geom::Pnt & | other | ) | const |
Checks whether two points are unequal within linear tolerance (default 1E-07)
Pnt Geom::Pnt::operator* | ( | double | scalar | ) | const |
bool Geom::Pnt::operator< | ( | const Geom::Pnt & | rhs | ) | const |
bool Geom::Pnt::operator== | ( | const Geom::Pnt & | other | ) | const |
Checks whether two points are equal within linear tolerance (default 1E-07)
double& Geom::Pnt::operator[] | ( | int | i | ) |
const double& Geom::Pnt::operator[] | ( | int | i | ) | const |
void Geom::Pnt::rotate | ( | const Geom::Ax1 & | A1, |
const double | Ang | ||
) |
void Geom::Pnt::scale | ( | const Pnt & | P, |
const double | S | ||
) |
Scales a point. S is the scaling value.
void Geom::Pnt::setCoord | ( | const double | Xp, |
const double | Yp, | ||
const double | Zp = .0 |
||
) |
For this point, assigns the values Xp, Yp and Zp to its three coordinates.
void Geom::Pnt::setCoord | ( | const int | Index, |
const double | Xi | ||
) |
Changes the coordinate of range Index :
Index = 1 => X is modified
Index = 2 => Y is modified
Index = 3 => Z is modified
//! Raised if Index != {1, 2, 3}.
void Geom::Pnt::setX | ( | const double | X | ) |
Assigns the given value to the X coordinate of this point.
void Geom::Pnt::setXYZ | ( | const Geom::XYZ & | Coord | ) |
Assigns the three coordinates of Coord to this point.
void Geom::Pnt::setY | ( | const double | Y | ) |
Assigns the given value to the Y coordinate of this point.
void Geom::Pnt::setZ | ( | const double | Z | ) |
Assigns the given value to the Z coordinate of this point.
double Geom::Pnt::squareDistance | ( | const Pnt & | Other | ) | const |
Computes the square distance between two points.
void Geom::Pnt::transform | ( | const Geom::Trsf & | T | ) |
Transforms a point with the transformation T.
Pnt Geom::Pnt::transformed | ( | const Geom::Trsf & | T | ) | const |
void Geom::Pnt::translate | ( | const Geom::Vec & | V | ) |
Translates a point in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.
Translates a point from the point P1 to the point P2.
double Geom::Pnt::x | ( | ) | const |
For this point, returns its X coordinate.
const Geom::XYZ& Geom::Pnt::xyz | ( | ) | const |
For this point, returns its three coordinates as a number triple.
double Geom::Pnt::y | ( | ) | const |
For this point, returns its X coordinate.
double Geom::Pnt::z | ( | ) | const |
For this point, returns its X coordinate.
|
inlinestatic |