TPolyTriangulator< VertexVector, Polygon > Class Template Reference

class to make a triangle mesh from a closed polygon More...

#include <mia/mesh/triangulate.hh>

Public Member Functions

 TPolyTriangulator (const VertexVector &vv)
 
template<class TriangleList >
bool triangulate (TriangleList &output, const Polygon &poly) const
 

Detailed Description

template<class VertexVector, class Polygon>
class TPolyTriangulator< VertexVector, Polygon >

class to make a triangle mesh from a closed polygon

This class is used to convert a closed polygon into a mesh defined by triangles.

Template Parameters
VertexVectortype of the vector that contains the vertices
PolygonThe type of the Polygon

Definition at line 38 of file triangulate.hh.

Constructor & Destructor Documentation

◆ TPolyTriangulator()

template<class VertexVector, class Polygon >
TPolyTriangulator< VertexVector, Polygon >::TPolyTriangulator ( const VertexVector &  vv)

Constructor to be initializes with a vector of vertices that used when defining the polygon

Parameters
vvthe vertices

Definition at line 79 of file triangulate.hh.

Member Function Documentation

◆ triangulate()

template<class VertexVector , class Polygon>
template<class TriangleList >
bool TPolyTriangulator< VertexVector, Polygon >::triangulate ( TriangleList &  output,
const Polygon &  poly 
) const

Evaluate the triangulation of the polygon that is defined by the vertices given above and their ordering by indices as given in poly.

Parameters
[out]outputthe list of triangles as list of index triples into the vertex arrey given in the constructor
[in]polythe index array into the vertex array describing the polygon
Returns
true of the triangulation was successfull and false if the polygon only consisted only of two corners.

Definition at line 87 of file triangulate.hh.

References clist< T >::begin(), cross(), cvdebug(), gsl::dot(), clist< T >::end(), NS_MIA_END, clist< T >::node::prev, clist< T >::push_back(), clist< T >::remove(), and clist< T >::node::succ.


The documentation for this class was generated from the following file: