VTK  9.3.20240328
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
51 #ifndef vtkContourTriangulator_h
52 #define vtkContourTriangulator_h
53 
54 #include "vtkFiltersGeneralModule.h" // For export macro
55 #include "vtkPolyDataAlgorithm.h"
56 
57 VTK_ABI_NAMESPACE_BEGIN
58 class vtkCellArray;
59 class vtkIdList;
60 
61 class VTKFILTERSGENERAL_EXPORT vtkContourTriangulator : public vtkPolyDataAlgorithm
62 {
63 public:
65 
70  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
74 
77  vtkGetMacro(TriangulationError, int);
79 
81 
86  vtkSetMacro(TriangulationErrorDisplay, vtkTypeBool);
87  vtkBooleanMacro(TriangulationErrorDisplay, vtkTypeBool);
88  vtkGetMacro(TriangulationErrorDisplay, vtkTypeBool);
90 
96  static int TriangulatePolygon(vtkIdList* polygon, vtkPoints* points, vtkCellArray* triangles);
97 
105  static int TriangulateContours(vtkPolyData* data, vtkIdType firstLine, vtkIdType numLines,
106  vtkCellArray* outputPolys, const double normal[3], vtkPolyDataAlgorithm* self = nullptr);
107 
108 protected:
111 
112  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
113  vtkInformationVector* outputVector) override;
114 
117 
118 private:
120  void operator=(const vtkContourTriangulator&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:285
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:132
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:138
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
@ points
Definition: vtkX3D.h:446
@ data
Definition: vtkX3D.h:315
int vtkTypeBool
Definition: vtkABI.h:64
int vtkIdType
Definition: vtkType.h:315