VTK
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 =========================================================================*/
56 #ifndef vtkPolyDataNormals_h
57 #define vtkPolyDataNormals_h
58 
59 #include "vtkFiltersCoreModule.h" // For export macro
60 #include "vtkPolyDataAlgorithm.h"
61 
62 class vtkFloatArray;
63 class vtkIdList;
64 class vtkPolyData;
65 
67 {
68 public:
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
75  static vtkPolyDataNormals *New();
76 
78 
81  vtkSetClampMacro(FeatureAngle,double,0.0,180.0);
82  vtkGetMacro(FeatureAngle,double);
84 
86 
87  vtkSetMacro(Splitting,int);
88  vtkGetMacro(Splitting,int);
89  vtkBooleanMacro(Splitting,int);
91 
93 
94  vtkSetMacro(Consistency,int);
95  vtkGetMacro(Consistency,int);
96  vtkBooleanMacro(Consistency,int);
98 
100 
108  vtkSetMacro(AutoOrientNormals, int);
109  vtkGetMacro(AutoOrientNormals, int);
110  vtkBooleanMacro(AutoOrientNormals, int);
112 
114 
115  vtkSetMacro(ComputePointNormals,int);
116  vtkGetMacro(ComputePointNormals,int);
117  vtkBooleanMacro(ComputePointNormals,int);
119 
121 
122  vtkSetMacro(ComputeCellNormals,int);
123  vtkGetMacro(ComputeCellNormals,int);
124  vtkBooleanMacro(ComputeCellNormals,int);
126 
128 
132  vtkSetMacro(FlipNormals,int);
133  vtkGetMacro(FlipNormals,int);
134  vtkBooleanMacro(FlipNormals,int);
136 
138 
141  vtkSetMacro(NonManifoldTraversal,int);
142  vtkGetMacro(NonManifoldTraversal,int);
143  vtkBooleanMacro(NonManifoldTraversal,int);
145 
147 
150  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
151  vtkGetMacro(OutputPointsPrecision, int);
153 
154 protected:
157 
158  // Usual data generation method
160 
161  double FeatureAngle;
169  int NumFlips;
171 
172 private:
173  vtkIdList *Wave;
174  vtkIdList *Wave2;
175  vtkIdList *CellIds;
176  vtkIdList *Map;
177  vtkPolyData *OldMesh;
178  vtkPolyData *NewMesh;
179  int *Visited;
180  vtkFloatArray *PolyNormals;
181  double CosAngle;
182 
183  // Uses the list of cell ids (this->Wave) to propagate a wave of
184  // checked and properly ordered polygons.
185  void TraverseAndOrder(void);
186 
187  // Check the point id give to see whether it lies on a feature
188  // edge. If so, split the point (i.e., duplicate it) to topologically
189  // separate the mesh.
190  void MarkAndSplit(vtkIdType ptId);
191 
192 private:
193  vtkPolyDataNormals(const vtkPolyDataNormals&); // Not implemented.
194  void operator=(const vtkPolyDataNormals&); // Not implemented.
195 };
196 
197 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKFILTERSCORE_EXPORT
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
compute normals for polygonal mesh
Store zero or more vtkInformation instances.