VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkContourTriangulator Class Reference

Fill all 2D contours to create polygons. More...

#include <vtkContourTriangulator.h>

Inheritance diagram for vtkContourTriangulator:
Inheritance graph
[legend]
Collaboration diagram for vtkContourTriangulator:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkPolyDataAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkContourTriangulatorNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual int GetTriangulationError ()
virtual void SetTriangulationErrorDisplay (int)
virtual void TriangulationErrorDisplayOn ()
virtual void TriangulationErrorDisplayOff ()
virtual int GetTriangulationErrorDisplay ()

Static Public Member Functions

static vtkContourTriangulatorNew ()
static int IsTypeOf (const char *type)
static vtkContourTriangulatorSafeDownCast (vtkObjectBase *o)
static int TriangulatePolygon (vtkIdList *polygon, vtkPoints *points, vtkCellArray *triangles)
static int TriangulateContours (vtkPolyData *data, vtkIdType firstLine, vtkIdType numLines, vtkCellArray *outputPolys, const double normal[3])

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkContourTriangulator ()
 ~vtkContourTriangulator ()
virtual int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)

Protected Attributes

int TriangulationError
int TriangulationErrorDisplay

Detailed Description

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.


Member Typedef Documentation

Reimplemented from vtkPolyDataAlgorithm.

Definition at line 49 of file vtkContourTriangulator.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkPolyDataAlgorithm.

static int vtkContourTriangulator::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataAlgorithm.

virtual int vtkContourTriangulator::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented from vtkPolyDataAlgorithm.

virtual vtkObjectBase* vtkContourTriangulator::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented from vtkPolyDataAlgorithm.

void vtkContourTriangulator::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPolyDataAlgorithm.

Check if there was a triangulation failure in the last update.

Generate errors when the triangulation fails. Note that triangulation failures are often minor, because they involve tiny triangles that are too small to see.

Generate errors when the triangulation fails. Note that triangulation failures are often minor, because they involve tiny triangles that are too small to see.

Generate errors when the triangulation fails. Note that triangulation failures are often minor, because they involve tiny triangles that are too small to see.

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 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkPolyDataAlgorithm.


Member Data Documentation

Definition at line 92 of file vtkContourTriangulator.h.

Definition at line 93 of file vtkContourTriangulator.h.


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