VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkContourTriangulator Class Reference

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

#include <vtkContourTriangulator.h>

Inherits vtkPolyDataAlgorithm.

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 vtkObjectBase * NewInstanceInternal () 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

typedef vtkPolyDataAlgorithm vtkContourTriangulator::Superclass

Definition at line 49 of file vtkContourTriangulator.h.

Constructor & Destructor Documentation

vtkContourTriangulator::vtkContourTriangulator ( )
protected
vtkContourTriangulator::~vtkContourTriangulator ( )
protected

Member Function Documentation

static vtkContourTriangulator* vtkContourTriangulator::New ( )
static
static int vtkContourTriangulator::IsTypeOf ( const char *  type)
static
virtual int vtkContourTriangulator::IsA ( const char *  type)
virtual
static vtkContourTriangulator* vtkContourTriangulator::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkContourTriangulator::NewInstanceInternal ( ) const
protectedvirtual
vtkContourTriangulator* vtkContourTriangulator::NewInstance ( ) const
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

Member Data Documentation

int vtkContourTriangulator::TriangulationError
protected

Definition at line 92 of file vtkContourTriangulator.h.

int vtkContourTriangulator::TriangulationErrorDisplay
protected

Definition at line 93 of file vtkContourTriangulator.h.


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