Class xlifepp::Point#
-
class Point : public std::vector<real_t>#
-
Inheritence diagram for xlifepp::Point:
Collaboration diagram for xlifepp::Point:
holds point coordinates in any dimension
Class Point to hide vector<real_t> class to users (see e.g. Function) and holds point coordinates in any dimension. It is implemented as a child class to stl vector<real_t> and thus inherits of all member functions and algorithms of stl class ‘vector’.
Public Types
-
typedef real_t SepValueType#
-
useful typedef
Public Functions
-
inline Point()#
-
void constructor
-
explicit Point(const real_t x1)#
-
1D constructor by coordinate
-
Point(const real_t x1, const real_t x2)#
-
2D constructor by coordinates
-
Point(const real_t x1, const real_t x2, const real_t x3)#
-
3D constructor by coordinates
-
Point(const std::vector<real_t> &pt)#
-
constructor from stl vector (not declared explicit to allow autocast)
-
Point(const std::vector<real_t> &pt, dimen_t d)#
-
constructor from stl vector with dimension management
-
void dimError(const string_t &s, const dimen_t) const#
-
error message, the string is to tell in which function the error is detected
-
void print(std::ostream&) const#
-
print on output stream as (x, y, z)
-
void printRaw(std::ostream&) const#
-
print on output stream as x y z
-
void printTeX(std::ostream&) const#
-
prints, on stream os, the coordinates of the point for TeX exploitation;
Prints, on stream os, the coordinates of the point in fixed format, separated by commas, for TeX exploitation.
-
Point roundToZero(real_t aszero = 100. * theEpsilon) const#
-
round coordinates to zero
-
string_t toString() const#
-
return coordinates as string (x1,x2,…)
-
inline std::vector<real_t> toVect()#
-
convert to a std::vector
-
inline real_t &x()#
-
return the first coordinate (read/write)
-
inline real_t x() const#
-
return the first coordinate (read)
-
inline real_t &y()#
-
return the second coordinate (read/write)
-
inline real_t y() const#
-
return the second coordinate (read)
-
inline real_t &z()#
-
return the third coordinate (read/write)
-
inline real_t z() const#
-
return the third coordinate (read)
Public Static Attributes
-
static real_t tolerance#
-
value of the tolerance used in equality test (theTolerance by default)
-
typedef real_t SepValueType#