SFCGAL  2.2.0
Public Member Functions | List of all members
SFCGAL::Triangle Class Reference

[OGC/SFA]Triangle More...

#include <Triangle.h>

Inheritance diagram for SFCGAL::Triangle:
SFCGAL::Surface

Public Member Functions

 Triangle ()
 empty Triangle constructor More...
 
 Triangle (const Kernel::Triangle_2 &triangle)
 Constructor with a CGAL triangle. More...
 
 Triangle (const Kernel::Triangle_3 &triangle)
 Constructor with a CGAL triangle. More...
 
 Triangle (const Point &p, const Point &q, const Point &r)
 constructor with 3 points More...
 
 Triangle (const Triangle &other)
 copy constructor More...
 
Triangleoperator= (const Triangle &other)
 assign operator More...
 
 ~Triangle ()
 destructor More...
 
Triangleclone () const override
 
std::string geometryType () const override
 
GeometryType geometryTypeId () const override
 
int coordinateDimension () const override
 
bool isEmpty () const override
 
bool is3D () const override
 
bool isMeasured () const override
 
auto dropZ () -> bool override
 
auto dropM () -> bool override
 
auto swapXY () -> void override
 
void reverse ()
 reverse Triangle orientation More...
 
Polygon toPolygon () const
 convert a triangle to a polygon More...
 
const Pointvertex (const int &i) const
 returns the i-th vertex More...
 
Pointvertex (const int &i)
 returns the i-th vertex More...
 
Kernel::Triangle_2 toTriangle_2 () const
 Convert to CGAL::Triangle_2. More...
 
Kernel::Triangle_3 toTriangle_3 () const
 Convert to CGAL::Triangle_3. More...
 
template<int D>
detail::TypeForDimension< D >::Triangle toTriangle_d () const
 Convert to CGAL::Triangle_2 or CGAL::Triangle_2. More...
 
void accept (GeometryVisitor &visitor) override
 
void accept (ConstGeometryVisitor &visitor) const override
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer. More...
 
- Public Member Functions inherited from SFCGAL::Surface
virtual ~Surface ()
 destructor More...
 
int dimension () const override
 

Additional Inherited Members

- Protected Member Functions inherited from SFCGAL::Surface
 Surface ()
 [OGC/SFS]"The area of this Surface, as measured in the spatial reference system of this Surface" More...
 
 Surface (Surface const &other)
 no copy constructor More...
 

Detailed Description

[OGC/SFA]Triangle

Warning
According to SFA, a Triangle should be inherited from a Polygon. That means that a triangle "is a" Polygon with hole. This inheritance is removed in order to keep CGAL modeling.
An empty triangle has empty points

Constructor & Destructor Documentation

SFCGAL::Triangle::Triangle ( )

empty Triangle constructor

SFCGAL::Triangle::Triangle ( const Kernel::Triangle_2 &  triangle)

Constructor with a CGAL triangle.

SFCGAL::Triangle::Triangle ( const Kernel::Triangle_3 &  triangle)

Constructor with a CGAL triangle.

SFCGAL::Triangle::Triangle ( const Point p,
const Point q,
const Point r 
)

constructor with 3 points

SFCGAL::Triangle::Triangle ( const Triangle other)

copy constructor

SFCGAL::Triangle::~Triangle ( )
default

destructor

Member Function Documentation

void SFCGAL::Triangle::accept ( GeometryVisitor visitor)
override
void SFCGAL::Triangle::accept ( ConstGeometryVisitor visitor) const
override
auto SFCGAL::Triangle::clone ( ) const
override
auto SFCGAL::Triangle::coordinateDimension ( ) const
override
auto SFCGAL::Triangle::dropM ( ) -> bool
override
auto SFCGAL::Triangle::dropZ ( ) -> bool
override
auto SFCGAL::Triangle::geometryType ( ) const
override
auto SFCGAL::Triangle::geometryTypeId ( ) const
override
auto SFCGAL::Triangle::is3D ( ) const
override
auto SFCGAL::Triangle::isEmpty ( ) const
override
auto SFCGAL::Triangle::isMeasured ( ) const
override
auto SFCGAL::Triangle::operator= ( const Triangle other)

assign operator

void SFCGAL::Triangle::reverse ( )

reverse Triangle orientation

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

Serializer.

auto SFCGAL::Triangle::swapXY ( ) -> void
override
auto SFCGAL::Triangle::toPolygon ( ) const

convert a triangle to a polygon

Kernel::Triangle_2 SFCGAL::Triangle::toTriangle_2 ( ) const
inline

Convert to CGAL::Triangle_2.

Kernel::Triangle_3 SFCGAL::Triangle::toTriangle_3 ( ) const
inline

Convert to CGAL::Triangle_3.

template<int D>
detail::TypeForDimension<D>::Triangle SFCGAL::Triangle::toTriangle_d ( ) const
inline

Convert to CGAL::Triangle_2 or CGAL::Triangle_2.

const Point& SFCGAL::Triangle::vertex ( const int &  i) const
inline

returns the i-th vertex

Point& SFCGAL::Triangle::vertex ( const int &  i)
inline

returns the i-th vertex