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

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 =========================================================================*/
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   // Usual data generation method
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   // Uses the list of cell ids (this->Wave) to propagate a wave of
00162   // checked and properly ordered polygons.
00163   void TraverseAndOrder(void);
00164 
00165   // Check the point id give to see whether it lies on a feature
00166   // edge. If so, split the point (i.e., duplicate it) to topologically
00167   // separate the mesh.
00168   void MarkAndSplit(vtkIdType ptId);
00169 
00170 private:
00171   vtkPolyDataNormals(const vtkPolyDataNormals&);  // Not implemented.
00172   void operator=(const vtkPolyDataNormals&);  // Not implemented.
00173 };
00174 
00175 #endif

Generated on Mon Jan 21 23:07:25 2008 for VTK by  doxygen 1.4.3-20050530