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=========================================================================*/
72#ifndef vtkPolyDataNormals_h
73#define vtkPolyDataNormals_h
74
75#include "vtkFiltersCoreModule.h" // For export macro
77
78class vtkFloatArray;
79class vtkIdList;
80class vtkPolyData;
81
82class VTKFILTERSCORE_EXPORT vtkPolyDataNormals : public vtkPolyDataAlgorithm
83{
84public:
86 void PrintSelf(ostream& os, vtkIndent indent) override;
87
94
96
101 vtkSetClampMacro(FeatureAngle, double, 0.0, 180.0);
102 vtkGetMacro(FeatureAngle, double);
104
106
109 vtkSetMacro(Splitting, vtkTypeBool);
110 vtkGetMacro(Splitting, vtkTypeBool);
111 vtkBooleanMacro(Splitting, vtkTypeBool);
113
115
118 vtkSetMacro(Consistency, vtkTypeBool);
119 vtkGetMacro(Consistency, vtkTypeBool);
120 vtkBooleanMacro(Consistency, vtkTypeBool);
122
124
135 vtkSetMacro(AutoOrientNormals, vtkTypeBool);
136 vtkGetMacro(AutoOrientNormals, vtkTypeBool);
137 vtkBooleanMacro(AutoOrientNormals, vtkTypeBool);
139
141
144 vtkSetMacro(ComputePointNormals, vtkTypeBool);
145 vtkGetMacro(ComputePointNormals, vtkTypeBool);
146 vtkBooleanMacro(ComputePointNormals, vtkTypeBool);
148
150
153 vtkSetMacro(ComputeCellNormals, vtkTypeBool);
154 vtkGetMacro(ComputeCellNormals, vtkTypeBool);
155 vtkBooleanMacro(ComputeCellNormals, vtkTypeBool);
157
159
165 vtkSetMacro(FlipNormals, vtkTypeBool);
166 vtkGetMacro(FlipNormals, vtkTypeBool);
167 vtkBooleanMacro(FlipNormals, vtkTypeBool);
169
171
176 vtkSetMacro(NonManifoldTraversal, vtkTypeBool);
177 vtkGetMacro(NonManifoldTraversal, vtkTypeBool);
178 vtkBooleanMacro(NonManifoldTraversal, vtkTypeBool);
180
182
187 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
188 vtkGetMacro(OutputPointsPrecision, int);
190
191protected:
193 ~vtkPolyDataNormals() override = default;
194
195 // Usual data generation method
197
208
209private:
210 vtkIdList* Wave;
211 vtkIdList* Wave2;
212 vtkIdList* CellIds;
213 vtkIdList* CellPoints;
214 vtkIdList* NeighborPoints;
215 vtkIdList* Map;
216 vtkPolyData* OldMesh;
217 vtkPolyData* NewMesh;
218 int* Visited;
219 vtkFloatArray* PolyNormals;
220 double CosAngle;
221
222 // Uses the list of cell ids (this->Wave) to propagate a wave of
223 // checked and properly ordered polygons.
224 void TraverseAndOrder(void);
225
226 // Check the point id give to see whether it lies on a feature
227 // edge. If so, split the point (i.e., duplicate it) to topologically
228 // separate the mesh.
229 void MarkAndSplit(vtkIdType ptId);
230
231private:
232 vtkPolyDataNormals(const vtkPolyDataNormals&) = delete;
233 void operator=(const vtkPolyDataNormals&) = delete;
234};
235
236#endif
dynamic, self-adjusting array of float
list of point or cell ids
Definition vtkIdList.h:43
a simple class to control print indentation
Definition vtkIndent.h:49
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
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332