VTK  9.3.0
vtkContourTriangulator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkContourTriangulator_h
33 #define vtkContourTriangulator_h
34 
35 #include "vtkFiltersGeneralModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkCellArray;
40 class vtkIdList;
41 
42 class VTKFILTERSGENERAL_EXPORT vtkContourTriangulator : public vtkPolyDataAlgorithm
43 {
44 public:
46 
51  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
58  vtkGetMacro(TriangulationError, int);
60 
62 
67  vtkSetMacro(TriangulationErrorDisplay, vtkTypeBool);
68  vtkBooleanMacro(TriangulationErrorDisplay, vtkTypeBool);
69  vtkGetMacro(TriangulationErrorDisplay, vtkTypeBool);
71 
77  static int TriangulatePolygon(vtkIdList* polygon, vtkPoints* points, vtkCellArray* triangles);
78 
86  static int TriangulateContours(vtkPolyData* data, vtkIdType firstLine, vtkIdType numLines,
87  vtkCellArray* outputPolys, const double normal[3], vtkPolyDataAlgorithm* self = nullptr);
88 
89 protected:
92 
93  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
94  vtkInformationVector* outputVector) override;
95 
98 
99 private:
101  void operator=(const vtkContourTriangulator&) = delete;
102 };
103 
104 VTK_ABI_NAMESPACE_END
105 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:176
Fill all 2D contours to create polygons.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, obtaining type information, and printing.
static int TriangulateContours(vtkPolyData *data, vtkIdType firstLine, vtkIdType numLines, vtkCellArray *outputPolys, const double normal[3], vtkPolyDataAlgorithm *self=nullptr)
Given some closed contour lines, create a triangle mesh that fills those lines.
static vtkContourTriangulator * New()
Standard methods for instantiation, obtaining type information, and printing.
static int TriangulatePolygon(vtkIdList *polygon, vtkPoints *points, vtkCellArray *triangles)
A robust method for triangulating a polygon.
~vtkContourTriangulator() override
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
list of point or cell ids
Definition: vtkIdList.h:23
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:29
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:80
@ points
Definition: vtkX3D.h:446
@ data
Definition: vtkX3D.h:315
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315