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
41 #ifndef vtkContourTriangulator_h
42 #define vtkContourTriangulator_h
43 
44 #include "vtkFiltersGeneralModule.h" // For export macro
45 #include "vtkPolyDataAlgorithm.h"
46 
47 VTK_ABI_NAMESPACE_BEGIN
48 class vtkCellArray;
49 class vtkIdList;
50 
51 class VTKFILTERSGENERAL_EXPORT vtkContourTriangulator : public vtkPolyDataAlgorithm
52 {
53 public:
55 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
67  vtkGetMacro(TriangulationError, int);
69 
71 
76  vtkSetMacro(TriangulationErrorDisplay, vtkTypeBool);
77  vtkBooleanMacro(TriangulationErrorDisplay, vtkTypeBool);
78  vtkGetMacro(TriangulationErrorDisplay, vtkTypeBool);
80 
86  static int TriangulatePolygon(vtkIdList* polygon, vtkPoints* points, vtkCellArray* triangles);
87 
95  static int TriangulateContours(vtkPolyData* data, vtkIdType firstLine, vtkIdType numLines,
96  vtkCellArray* outputPolys, const double normal[3], vtkPolyDataAlgorithm* self = nullptr);
97 
98 protected:
101 
102  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
103  vtkInformationVector* outputVector) override;
104 
107 
108 private:
110  void operator=(const vtkContourTriangulator&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:185
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:32
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:38
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
@ points
Definition: vtkX3D.h:446
@ data
Definition: vtkX3D.h:315
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315