VTK  9.2.6
vtkPolyDataNormals.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPolyDataNormals.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
63#ifndef vtkPolyDataNormals_h
64#define vtkPolyDataNormals_h
65
66#include "vtkFiltersCoreModule.h" // For export macro
68
69class vtkFloatArray;
70class vtkIdList;
71class vtkPolyData;
72
73class VTKFILTERSCORE_EXPORT vtkPolyDataNormals : public vtkPolyDataAlgorithm
74{
75public:
77 void PrintSelf(ostream& os, vtkIndent indent) override;
78
85
87
92 vtkSetClampMacro(FeatureAngle, double, 0.0, 180.0);
93 vtkGetMacro(FeatureAngle, double);
95
97
100 vtkSetMacro(Splitting, vtkTypeBool);
101 vtkGetMacro(Splitting, vtkTypeBool);
102 vtkBooleanMacro(Splitting, vtkTypeBool);
104
106
109 vtkSetMacro(Consistency, vtkTypeBool);
110 vtkGetMacro(Consistency, vtkTypeBool);
111 vtkBooleanMacro(Consistency, vtkTypeBool);
113
115
126 vtkSetMacro(AutoOrientNormals, vtkTypeBool);
127 vtkGetMacro(AutoOrientNormals, vtkTypeBool);
128 vtkBooleanMacro(AutoOrientNormals, vtkTypeBool);
130
132
135 vtkSetMacro(ComputePointNormals, vtkTypeBool);
136 vtkGetMacro(ComputePointNormals, vtkTypeBool);
137 vtkBooleanMacro(ComputePointNormals, vtkTypeBool);
139
141
144 vtkSetMacro(ComputeCellNormals, vtkTypeBool);
145 vtkGetMacro(ComputeCellNormals, vtkTypeBool);
146 vtkBooleanMacro(ComputeCellNormals, vtkTypeBool);
148
150
156 vtkSetMacro(FlipNormals, vtkTypeBool);
157 vtkGetMacro(FlipNormals, vtkTypeBool);
158 vtkBooleanMacro(FlipNormals, vtkTypeBool);
160
162
167 vtkSetMacro(NonManifoldTraversal, vtkTypeBool);
168 vtkGetMacro(NonManifoldTraversal, vtkTypeBool);
169 vtkBooleanMacro(NonManifoldTraversal, vtkTypeBool);
171
173
178 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
179 vtkGetMacro(OutputPointsPrecision, int);
181
182protected:
184 ~vtkPolyDataNormals() override = default;
185
186 // Usual data generation method
188
199
200private:
201 vtkIdList* Wave;
202 vtkIdList* Wave2;
203 vtkIdList* CellIds;
204 vtkIdList* CellPoints;
205 vtkIdList* NeighborPoints;
206 vtkIdList* Map;
207 vtkPolyData* OldMesh;
208 vtkPolyData* NewMesh;
209 int* Visited;
210 vtkFloatArray* PolyNormals;
211 double CosAngle;
212
213 // Uses the list of cell ids (this->Wave) to propagate a wave of
214 // checked and properly ordered polygons.
215 void TraverseAndOrder(void);
216
217 // Check the point id give to see whether it lies on a feature
218 // edge. If so, split the point (i.e., duplicate it) to topologically
219 // separate the mesh.
220 void MarkAndSplit(vtkIdType ptId);
221
222private:
223 vtkPolyDataNormals(const vtkPolyDataNormals&) = delete;
224 void operator=(const vtkPolyDataNormals&) = delete;
225};
226
227#endif
dynamic, self-adjusting array of float
list of point or cell ids
Definition vtkIdList.h:34
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
compute normals for polygonal mesh
static vtkPolyDataNormals * New()
Construct with feature angle=30, splitting and consistency turned on, flipNormals turned off,...
~vtkPolyDataNormals() override=default
vtkTypeBool NonManifoldTraversal
vtkTypeBool ComputePointNormals
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332