Graphics/vtkPolyDataNormals.h Source File

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

# 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 =========================================================================*/
    00060 #ifndef __vtkPolyDataNormals_h
    00061 #define __vtkPolyDataNormals_h
    00062
    00063 #include "vtkPolyDataToPolyDataFilter.h"
    00064
    00065 class vtkFloatArray;
    00066 class vtkIdList;
    00067 class vtkPolyData;
    00068
    00069 class VTK_GRAPHICS_EXPORT vtkPolyDataNormals : public vtkPolyDataToPolyDataFilter
    00070 {
    00071 public:
    00072   vtkTypeRevisionMacro(vtkPolyDataNormals,vtkPolyDataToPolyDataFilter);
    00073   void PrintSelf(ostream& os, vtkIndent indent);
    00074
    00078   static vtkPolyDataNormals *New();
    00079
    00081
    00084   vtkSetClampMacro(FeatureAngle,float,0.0,180.0);
    00085   vtkGetMacro(FeatureAngle,float);
    00087
    00089
    00090   vtkSetMacro(Splitting,int);
    00091   vtkGetMacro(Splitting,int);
    00092   vtkBooleanMacro(Splitting,int);
    00094
    00096
    00097   vtkSetMacro(Consistency,int);
    00098   vtkGetMacro(Consistency,int);
    00099   vtkBooleanMacro(Consistency,int);
    00101
    00103
    00104   vtkSetMacro(ComputePointNormals,int);
    00105   vtkGetMacro(ComputePointNormals,int);
    00106   vtkBooleanMacro(ComputePointNormals,int);
    00108
    00110
    00111   vtkSetMacro(ComputeCellNormals,int);
    00112   vtkGetMacro(ComputeCellNormals,int);
    00113   vtkBooleanMacro(ComputeCellNormals,int);
    00115
    00117
    00121   vtkSetMacro(FlipNormals,int);
    00122   vtkGetMacro(FlipNormals,int);
    00123   vtkBooleanMacro(FlipNormals,int);
    00125
    00127
    00130   vtkSetMacro(NonManifoldTraversal,int);
    00131   vtkGetMacro(NonManifoldTraversal,int);
    00132   vtkBooleanMacro(NonManifoldTraversal,int);
    00134
    00135 protected:
    00136   vtkPolyDataNormals();
    00137   ~vtkPolyDataNormals() {};
    00138
    00139   // Usual data generation method
    00140   void Execute();
    00141
    00142   float FeatureAngle;
    00143   int Splitting;
    00144   int Consistency;
    00145   int FlipNormals;
    00146   int NonManifoldTraversal;
    00147   int ComputePointNormals;
    00148   int ComputeCellNormals;
    00149   int NumFlips;
    00150
    00151 private:
    00152   vtkIdList *Wave;
    00153   vtkIdList *Wave2;
    00154   vtkIdList *CellIds;
    00155   vtkIdList *Map;
    00156   vtkPolyData *OldMesh;
    00157   vtkPolyData *NewMesh;
    00158   int *Visited;
    00159   vtkFloatArray *PolyNormals;
    00160   float CosAngle;
    00161
    00162   // Uses the list of cell ids (this->Wave) to propagate a wave of
    00163   // checked and properly ordered polygons.
    00164   void TraverseAndOrder(void);
    00165
    00166   // Check the point id give to see whether it lies on a feature
    00167   // edge. If so, split the point (i.e., duplicate it) to topologically
    00168   // separate the mesh.
    00169   void MarkAndSplit(vtkIdType ptId);
    00170
    00171 private:
    00172   vtkPolyDataNormals(const vtkPolyDataNormals&);  // Not implemented.
    00173   void operator=(const vtkPolyDataNormals&);  // Not implemented.
    00174 };
    00175
    00176 #endif