Skip to content

Class SFCGAL::Coordinate#

ClassList > SFCGAL > Coordinate

Represents the Coordinate of aPoint (wraps either an empty structure, or a Kernel::Point_2, or a Kernel::Point_3)

  • #include <Coordinate.h>

Classes#

Type Name
class Empty

Public Functions#

Type Name
Coordinate ()
Coordinate (const Kernel::FT & x, const Kernel::FT & y)
Coordinate (const Kernel::FT & x, const Kernel::FT & y, const Kernel::FT & z)
Coordinate (const double & x, const double & y, const double & z)
Coordinate (const double & x, const double & y)
Coordinate (const Kernel::Point_2 & other)
Coordinate (const Kernel::Point_3 & other)
Coordinate (const Coordinate & other)
bool almostEqual (const Coordinate & other, const double tolerance) const
int coordinateDimension () const
Get the dimension of the coordinates.
auto dropZ ()
Drops the z coordinate.
bool is3D () const
Tests if Z is defined.
bool isEmpty () const
Tests if the coordinates are empty.
void load (Archive & ar, const unsigned int)
bool operator!= (const Coordinate & other) const
Compares with an other point.
bool operator< (const Coordinate & other) const
Compares two points (lexicographic order)
Coordinate & operator= (const Coordinate & other)
bool operator== (const Coordinate & other) const
Compares with an other point.
Coordinate & round (const long & scaleFactor=1)
round coordinates with a scale factor
void save (Archive & ar, const unsigned int) const
void serialize (Archive & ar, const unsigned int version)
auto swapXY ()
Swaps the x and y coordinates.
Kernel::Point_2 toPoint_2 () const
Converts to Kernel::Point_2.
Kernel::Point_3 toPoint_3 () const
Converts to Kernel::Point_3.
Kernel::Vector_2 toVector_2 () const
Converts to Kernel::Vector_2.
Kernel::Vector_3 toVector_3 () const
Converts to Kernel::Vector_3.
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 ()

Public Functions Documentation#

function Coordinate [1/8]#

SFCGAL::Coordinate::Coordinate () 

Empty Coordinate constructor


function Coordinate [2/8]#

SFCGAL::Coordinate::Coordinate (
    const Kernel::FT & x,
    const Kernel::FT & y
) 

XY Constructor with exact coordinates


function Coordinate [3/8]#

SFCGAL::Coordinate::Coordinate (
    const Kernel::FT & x,
    const Kernel::FT & y,
    const Kernel::FT & z
) 

XYZ Constructor with exact coordinates


function Coordinate [4/8]#

SFCGAL::Coordinate::Coordinate (
    const double & x,
    const double & y,
    const double & z
) 

XYZ constructor

Warning:

x,y,z must not be not be NaN nor inf


function Coordinate [5/8]#

SFCGAL::Coordinate::Coordinate (
    const double & x,
    const double & y
) 

XY constructor

Warning:

x,y must not be not be NaN nor inf


function Coordinate [6/8]#

SFCGAL::Coordinate::Coordinate (
    const Kernel::Point_2 & other
) 

Constructor from CGAL::Point_2<K>


function Coordinate [7/8]#

SFCGAL::Coordinate::Coordinate (
    const Kernel::Point_3 & other
) 

Constructor from CGAL::Point_3<K>


function Coordinate [8/8]#

SFCGAL::Coordinate::Coordinate (
    const Coordinate & other
) 

copy constructor


function almostEqual#

bool SFCGAL::Coordinate::almostEqual (
    const Coordinate & other,
    const double tolerance
) const

absolute comparison with an other coordinate


function coordinateDimension#

Get the dimension of the coordinates.

int SFCGAL::Coordinate::coordinateDimension () const

function dropZ#

Drops the z coordinate.

auto SFCGAL::Coordinate::dropZ () 

Returns:

TRUE if a Z value was present and has been removed


function is3D#

Tests if Z is defined.

bool SFCGAL::Coordinate::is3D () const

function isEmpty#

Tests if the coordinates are empty.

bool SFCGAL::Coordinate::isEmpty () const

function load#

template<class Archive>
inline void SFCGAL::Coordinate::load (
    Archive & ar,
    const unsigned int
) 

function operator!=#

Compares with an other point.

bool SFCGAL::Coordinate::operator!= (
    const Coordinate & other
) const

Warning:

coordinates must have the same dimension


function operator<#

Compares two points (lexicographic order)

bool SFCGAL::Coordinate::operator< (
    const Coordinate & other
) const

Warning:

coordinates must have the same dimension


function operator=#

Coordinate & SFCGAL::Coordinate::operator= (
    const Coordinate & other
) 

assign operator


function operator==#

Compares with an other point.

bool SFCGAL::Coordinate::operator== (
    const Coordinate & other
) const

Warning:

coordinates must have the same dimension


function round#

round coordinates with a scale factor

Coordinate & SFCGAL::Coordinate::round (
    const long & scaleFactor=1
) 

Returns:

*this


function save#

template<class Archive>
inline void SFCGAL::Coordinate::save (
    Archive & ar,
    const unsigned int
) const

Serialization


function serialize#

template<class Archive>
inline void SFCGAL::Coordinate::serialize (
    Archive & ar,
    const unsigned int version
) 

function swapXY#

Swaps the x and y coordinates.

auto SFCGAL::Coordinate::swapXY () 

function toPoint_2#

Converts to Kernel::Point_2.

Kernel::Point_2 SFCGAL::Coordinate::toPoint_2 () const

function toPoint_3#

Converts to Kernel::Point_3.

Kernel::Point_3 SFCGAL::Coordinate::toPoint_3 () const

function toVector_2#

Converts to Kernel::Vector_2.

inline Kernel::Vector_2 SFCGAL::Coordinate::toVector_2 () const

function toVector_3#

Converts to Kernel::Vector_3.

inline Kernel::Vector_3 SFCGAL::Coordinate::toVector_3 () const

function x#

Gets the x value.

Kernel::FT SFCGAL::Coordinate::x () const

Warning:

Exact, NaN for empty coordinates


function y#

Gets the y value.

Kernel::FT SFCGAL::Coordinate::y () const

Warning:

Exact, NaN for empty coordinates


function z#

Gets the z value.

Kernel::FT SFCGAL::Coordinate::z () const

Warning:

Exact, NaN for empty or 0 for 2D coordinates


function ~Coordinate#

SFCGAL::Coordinate::~Coordinate () 

destructor



The documentation for this class was generated from the following file /builds/sfcgal/SFCGAL/src/Coordinate.h