00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00044 #ifndef __vtkPolyDataNormals_h
00045 #define __vtkPolyDataNormals_h
00046
00047 #include "vtkPolyDataAlgorithm.h"
00048
00049 class vtkFloatArray;
00050 class vtkIdList;
00051 class vtkPolyData;
00052
00053 class VTK_GRAPHICS_EXPORT vtkPolyDataNormals : public vtkPolyDataAlgorithm
00054 {
00055 public:
00056 vtkTypeRevisionMacro(vtkPolyDataNormals,vtkPolyDataAlgorithm);
00057 void PrintSelf(ostream& os, vtkIndent indent);
00058
00062 static vtkPolyDataNormals *New();
00063
00065
00068 vtkSetClampMacro(FeatureAngle,double,0.0,180.0);
00069 vtkGetMacro(FeatureAngle,double);
00071
00073
00074 vtkSetMacro(Splitting,int);
00075 vtkGetMacro(Splitting,int);
00076 vtkBooleanMacro(Splitting,int);
00078
00080
00081 vtkSetMacro(Consistency,int);
00082 vtkGetMacro(Consistency,int);
00083 vtkBooleanMacro(Consistency,int);
00085
00087
00095 vtkSetMacro(AutoOrientNormals, int);
00096 vtkGetMacro(AutoOrientNormals, int);
00097 vtkBooleanMacro(AutoOrientNormals, int);
00099
00101
00102 vtkSetMacro(ComputePointNormals,int);
00103 vtkGetMacro(ComputePointNormals,int);
00104 vtkBooleanMacro(ComputePointNormals,int);
00106
00108
00109 vtkSetMacro(ComputeCellNormals,int);
00110 vtkGetMacro(ComputeCellNormals,int);
00111 vtkBooleanMacro(ComputeCellNormals,int);
00113
00115
00119 vtkSetMacro(FlipNormals,int);
00120 vtkGetMacro(FlipNormals,int);
00121 vtkBooleanMacro(FlipNormals,int);
00123
00125
00128 vtkSetMacro(NonManifoldTraversal,int);
00129 vtkGetMacro(NonManifoldTraversal,int);
00130 vtkBooleanMacro(NonManifoldTraversal,int);
00132
00133 protected:
00134 vtkPolyDataNormals();
00135 ~vtkPolyDataNormals() {};
00136
00137
00138 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00139
00140 double FeatureAngle;
00141 int Splitting;
00142 int Consistency;
00143 int FlipNormals;
00144 int AutoOrientNormals;
00145 int NonManifoldTraversal;
00146 int ComputePointNormals;
00147 int ComputeCellNormals;
00148 int NumFlips;
00149
00150 private:
00151 vtkIdList *Wave;
00152 vtkIdList *Wave2;
00153 vtkIdList *CellIds;
00154 vtkIdList *Map;
00155 vtkPolyData *OldMesh;
00156 vtkPolyData *NewMesh;
00157 int *Visited;
00158 vtkFloatArray *PolyNormals;
00159 double CosAngle;
00160
00161
00162
00163 void TraverseAndOrder(void);
00164
00165
00166
00167
00168 void MarkAndSplit(vtkIdType ptId);
00169
00170 private:
00171 vtkPolyDataNormals(const vtkPolyDataNormals&);
00172 void operator=(const vtkPolyDataNormals&);
00173 };
00174
00175 #endif