Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Graphics/vtkPolyDataNormals.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPolyDataNormals.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00048 #ifndef __vtkPolyDataNormals_h 00049 #define __vtkPolyDataNormals_h 00050 00051 #include "vtkPolyDataToPolyDataFilter.h" 00052 00053 class vtkFloatArray; 00054 class vtkIdList; 00055 class vtkPolyData; 00056 00057 class VTK_GRAPHICS_EXPORT vtkPolyDataNormals : public vtkPolyDataToPolyDataFilter 00058 { 00059 public: 00060 vtkTypeRevisionMacro(vtkPolyDataNormals,vtkPolyDataToPolyDataFilter); 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00066 static vtkPolyDataNormals *New(); 00067 00069 00072 vtkSetClampMacro(FeatureAngle,float,0.0,180.0); 00073 vtkGetMacro(FeatureAngle,float); 00075 00077 00078 vtkSetMacro(Splitting,int); 00079 vtkGetMacro(Splitting,int); 00080 vtkBooleanMacro(Splitting,int); 00082 00084 00085 vtkSetMacro(Consistency,int); 00086 vtkGetMacro(Consistency,int); 00087 vtkBooleanMacro(Consistency,int); 00089 00091 00092 vtkSetMacro(ComputePointNormals,int); 00093 vtkGetMacro(ComputePointNormals,int); 00094 vtkBooleanMacro(ComputePointNormals,int); 00096 00098 00099 vtkSetMacro(ComputeCellNormals,int); 00100 vtkGetMacro(ComputeCellNormals,int); 00101 vtkBooleanMacro(ComputeCellNormals,int); 00103 00105 00109 vtkSetMacro(FlipNormals,int); 00110 vtkGetMacro(FlipNormals,int); 00111 vtkBooleanMacro(FlipNormals,int); 00113 00115 00118 vtkSetMacro(NonManifoldTraversal,int); 00119 vtkGetMacro(NonManifoldTraversal,int); 00120 vtkBooleanMacro(NonManifoldTraversal,int); 00122 00123 protected: 00124 vtkPolyDataNormals(); 00125 ~vtkPolyDataNormals() {}; 00126 00127 // Usual data generation method 00128 void Execute(); 00129 00130 float FeatureAngle; 00131 int Splitting; 00132 int Consistency; 00133 int FlipNormals; 00134 int NonManifoldTraversal; 00135 int ComputePointNormals; 00136 int ComputeCellNormals; 00137 int NumFlips; 00138 00139 private: 00140 vtkIdList *Wave; 00141 vtkIdList *Wave2; 00142 vtkIdList *CellIds; 00143 vtkIdList *Map; 00144 vtkPolyData *OldMesh; 00145 vtkPolyData *NewMesh; 00146 int *Visited; 00147 vtkFloatArray *PolyNormals; 00148 float CosAngle; 00149 00150 // Uses the list of cell ids (this->Wave) to propagate a wave of 00151 // checked and properly ordered polygons. 00152 void TraverseAndOrder(void); 00153 00154 // Check the point id give to see whether it lies on a feature 00155 // edge. If so, split the point (i.e., duplicate it) to topologically 00156 // separate the mesh. 00157 void MarkAndSplit(vtkIdType ptId); 00158 00159 private: 00160 vtkPolyDataNormals(const vtkPolyDataNormals&); // Not implemented. 00161 void operator=(const vtkPolyDataNormals&); // Not implemented. 00162 }; 00163 00164 #endif