• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Graphics/vtkPolyDataNormals.h

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

Generated by  doxygen 1.7.1