SFCGAL 1.4.1
|
Represents the Coordinate of a Point (wraps either an empty structure, or a Kernel::Point_2, or a Kernel::Point_3) More...
#include <Coordinate.h>
Classes | |
class | Empty |
Public Member Functions | |
Coordinate () | |
Empty Coordinate constructor. | |
Coordinate (const Kernel::FT &x, const Kernel::FT &y) | |
XY Constructor with exact coordinates. | |
Coordinate (const Kernel::FT &x, const Kernel::FT &y, const Kernel::FT &z) | |
XYZ Constructor with exact coordinates. | |
Coordinate (const double &x, const double &y, const double &z) | |
XYZ constructor. | |
Coordinate (const double &x, const double &y) | |
XY constructor. | |
Coordinate (const Kernel::Point_2 &other) | |
Constructor from CGAL::Point_2<K> | |
Coordinate (const Kernel::Point_3 &other) | |
Constructor from CGAL::Point_3<K> | |
Coordinate (const Coordinate &other) | |
copy constructor | |
Coordinate & | operator= (const Coordinate &other) |
assign operator | |
~Coordinate () | |
destructor | |
int | coordinateDimension () const |
Get the dimension of the coordinates. | |
bool | isEmpty () const |
Tests if the coordinates are empty. | |
bool | is3D () const |
Tests if Z is defined. | |
Kernel::FT | x () const |
Gets the x value. | |
Kernel::FT | y () const |
Gets the y value. | |
Kernel::FT | z () const |
Gets the z value. | |
Coordinate & | round (const long &scaleFactor=1) |
round coordinates with a scale factor | |
bool | operator< (const Coordinate &other) const |
Compares two points (lexicographic order) | |
bool | operator== (const Coordinate &other) const |
Compares with an other point. | |
bool | operator!= (const Coordinate &other) const |
Compares with an other point. | |
bool | almostEqual (const Coordinate &other, const double tolerance) const |
absolute comparison with an other coordinate | |
Kernel::Vector_2 | toVector_2 () const |
Converts to Kernel::Vector_2. | |
Kernel::Vector_3 | toVector_3 () const |
Converts to Kernel::Vector_3. | |
Kernel::Point_2 | toPoint_2 () const |
Converts to Kernel::Point_2. | |
Kernel::Point_3 | toPoint_3 () const |
Converts to Kernel::Point_3. | |
template<class Archive > | |
void | save (Archive &ar, const unsigned int) const |
Serialization. | |
template<class Archive > | |
void | load (Archive &ar, const unsigned int) |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Represents the Coordinate of a Point (wraps either an empty structure, or a Kernel::Point_2, or a Kernel::Point_3)
SFCGAL::Coordinate::Coordinate | ( | ) |
Empty Coordinate constructor.
SFCGAL::Coordinate::Coordinate | ( | const Kernel::FT & | x, |
const Kernel::FT & | y ) |
XY Constructor with exact coordinates.
SFCGAL::Coordinate::Coordinate | ( | const Kernel::FT & | x, |
const Kernel::FT & | y, | ||
const Kernel::FT & | z ) |
XYZ Constructor with exact coordinates.
SFCGAL::Coordinate::Coordinate | ( | const double & | x, |
const double & | y, | ||
const double & | z ) |
XYZ constructor.
SFCGAL::Coordinate::Coordinate | ( | const double & | x, |
const double & | y ) |
XY constructor.
SFCGAL::Coordinate::Coordinate | ( | const Kernel::Point_2 & | other | ) |
Constructor from CGAL::Point_2<K>
SFCGAL::Coordinate::Coordinate | ( | const Kernel::Point_3 & | other | ) |
Constructor from CGAL::Point_3<K>
|
default |
copy constructor
|
default |
destructor
auto SFCGAL::Coordinate::almostEqual | ( | const Coordinate & | other, |
const double | tolerance ) const |
absolute comparison with an other coordinate
auto SFCGAL::Coordinate::coordinateDimension | ( | ) | const |
Get the dimension of the coordinates.
auto SFCGAL::Coordinate::is3D | ( | ) | const |
Tests if Z is defined.
auto SFCGAL::Coordinate::isEmpty | ( | ) | const |
Tests if the coordinates are empty.
|
inline |
auto SFCGAL::Coordinate::operator!= | ( | const Coordinate & | other | ) | const |
Compares with an other point.
auto SFCGAL::Coordinate::operator< | ( | const Coordinate & | other | ) | const |
Compares two points (lexicographic order)
|
default |
assign operator
auto SFCGAL::Coordinate::operator== | ( | const Coordinate & | other | ) | const |
Compares with an other point.
auto SFCGAL::Coordinate::round | ( | const long & | scaleFactor = 1 | ) |
round coordinates with a scale factor
|
inline |
Serialization.
|
inline |
auto SFCGAL::Coordinate::toPoint_2 | ( | ) | const |
Converts to Kernel::Point_2.
auto SFCGAL::Coordinate::toPoint_3 | ( | ) | const |
Converts to Kernel::Point_3.
|
inline |
Converts to Kernel::Vector_2.
|
inline |
Converts to Kernel::Vector_3.
auto SFCGAL::Coordinate::x | ( | ) | const |
Gets the x value.
auto SFCGAL::Coordinate::y | ( | ) | const |
Gets the y value.
auto SFCGAL::Coordinate::z | ( | ) | const |
Gets the z value.