Fill all 2D contours to create polygons.
More...
#include <vtkContourTriangulator.h>
Inherits vtkPolyDataAlgorithm.
Fill all 2D contours to create polygons.
vtkContourTriangulator will generate triangles to fill all of the 2D contours in its input. The contours may be concave, and may even contain holes i.e. a contour may contain an internal contour that is wound in the opposite direction to indicate that it is a hole.
- Warning
- The triangulation of is done in O(n) time for simple convex inputs, but for non-convex inputs the worst-case time is O(n^2*m^2) where n is the number of points and m is the number of holes. The best triangulation algorithms, in contrast, are O(n log n). The resulting triangles may be quite narrow, the algorithm does not attempt to produce high-quality triangles.
- Thanks:
- Thanks to David Gobbi for contributing this class to VTK.
- Tests:
- vtkContourTriangulator (Tests)
Definition at line 45 of file vtkContourTriangulator.h.
vtkContourTriangulator::vtkContourTriangulator |
( |
| ) |
|
|
protected |
vtkContourTriangulator::~vtkContourTriangulator |
( |
| ) |
|
|
protected |
static int vtkContourTriangulator::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
virtual int vtkContourTriangulator::IsA |
( |
const char * |
type | ) |
|
|
virtual |
virtual vtkObjectBase* vtkContourTriangulator::NewInstanceInternal |
( |
| ) |
const |
|
protectedvirtual |
void vtkContourTriangulator::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
virtual int vtkContourTriangulator::GetTriangulationError |
( |
| ) |
|
|
virtual |
Check if there was a triangulation failure in the last update.
virtual void vtkContourTriangulator::SetTriangulationErrorDisplay |
( |
int |
| ) |
|
|
virtual |
Generate errors when the triangulation fails. Note that triangulation failures are often minor, because they involve tiny triangles that are too small to see.
virtual void vtkContourTriangulator::TriangulationErrorDisplayOn |
( |
| ) |
|
|
virtual |
Generate errors when the triangulation fails. Note that triangulation failures are often minor, because they involve tiny triangles that are too small to see.
virtual void vtkContourTriangulator::TriangulationErrorDisplayOff |
( |
| ) |
|
|
virtual |
Generate errors when the triangulation fails. Note that triangulation failures are often minor, because they involve tiny triangles that are too small to see.
virtual int vtkContourTriangulator::GetTriangulationErrorDisplay |
( |
| ) |
|
|
virtual |
Generate errors when the triangulation fails. Note that triangulation failures are often minor, because they involve tiny triangles that are too small to see.
static int vtkContourTriangulator::TriangulatePolygon |
( |
vtkIdList * |
polygon, |
|
|
vtkPoints * |
points, |
|
|
vtkCellArray * |
triangles |
|
) |
| |
|
static |
A robust method for triangulating a polygon. It cleans up the polygon and then applies the ear-cut triangulation. A zero return value indicates that triangulation failed.
static int vtkContourTriangulator::TriangulateContours |
( |
vtkPolyData * |
data, |
|
|
vtkIdType |
firstLine, |
|
|
vtkIdType |
numLines, |
|
|
vtkCellArray * |
outputPolys, |
|
|
const double |
normal[3] |
|
) |
| |
|
static |
Given some closed contour lines, create a triangle mesh that fills those lines. The input lines must be single-segment lines, not polylines. The input lines do not have to be in order. Only numLines starting from firstLine will be used.
virtual int vtkContourTriangulator::RequestData |
( |
vtkInformation * |
request, |
|
|
vtkInformationVector ** |
inputVector, |
|
|
vtkInformationVector * |
outputVector |
|
) |
| |
|
protectedvirtual |
int vtkContourTriangulator::TriangulationError |
|
protected |
int vtkContourTriangulator::TriangulationErrorDisplay |
|
protected |
The documentation for this class was generated from the following file: