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

  VertexVector | type of the vector that contains the vertices
  Polygon | The 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

  vv | the vertices

Definition at line 80 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] | output | the list of triangles as list of index triples into the vertex arrey given in the constructor
  [in] | poly | the 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 88 of file triangulate.hh.

References clist< T >::begin(), cvdebug(), clist< T >::end(), output, clist< T >::push_back(), and clist< T >::remove().

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

- triangulate.hh