Triangulation of faces. Handles concave polygons as well (inefficiently) More...
#include <triSurface/faceTriangulation.H>
Triangulation of faces. Handles concave polygons as well (inefficiently)
Works by trying to subdivide the face at the vertex with 'flattest' internal angle (i.e. closest to 180 deg).
Based on routine 'Diagonal' in
"Efficient Triangulation of Simple Polygons" Godfried Toussaint, McGill University.
After construction is the list of triangles the face is decomposed into. (Or empty list if no valid triangulation could be found).
Definition at line 66 of file faceTriangulation.H.
Public Member Functions | |
faceTriangulation () | |
Construct null.
| |
faceTriangulation (const pointField &points, const face &f, const bool fallBack=false) | |
Construct from face and points. Decomposition based on average.
| |
faceTriangulation (const pointField &points, const face &f, const vector &n, const bool fallBack=false) | |
Construct from face and points and user supplied (unit) normal.
| |
faceTriangulation (Istream &) | |
Construct from Istream.
|
Construct null.
Definition at line 614 of file faceTriangulation.C.
faceTriangulation | ( | const pointField & | points, |
const face & | f, | ||
const bool | fallBack = false
|
||
) |
Construct from face and points. Decomposition based on average.
normal. After construction *this is size 0 or holds the triangles. If fallBack and triangulation fails does naive triangulation and never returns 0 size.
Definition at line 622 of file faceTriangulation.C.
References Foam::mag(), face::normal(), and setSize().
faceTriangulation | ( | const pointField & | points, |
const face & | f, | ||
const vector & | n, | ||
const bool | fallBack = false
|
||
) |
Construct from face and points and user supplied (unit) normal.
After construction *this is size 0 or holds the triangles. If fallBack and triangulation fails does naive triangulation and never returns 0 size.
Definition at line 646 of file faceTriangulation.C.
References setSize().
faceTriangulation | ( | Istream & | is ) |
Construct from Istream.
Definition at line 667 of file faceTriangulation.C.