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

vtkGenericCellTessellator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGenericCellTessellator.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 =========================================================================*/
00042 #ifndef __vtkGenericCellTessellator_h
00043 #define __vtkGenericCellTessellator_h
00044 
00045 #include "vtkObject.h"
00046 
00047 class vtkCellArray;
00048 class vtkDoubleArray;
00049 class vtkCollection;
00050 class vtkGenericAttributeCollection;
00051 class vtkGenericAdaptorCell;
00052 class vtkGenericCellIterator;
00053 class vtkPointData;
00054 class vtkGenericDataSet;
00055 
00056 //-----------------------------------------------------------------------------
00057 //
00058 // The tessellation object
00059 class VTK_FILTERING_EXPORT vtkGenericCellTessellator : public vtkObject
00060 {
00061 public:
00062   vtkTypeRevisionMacro(vtkGenericCellTessellator,vtkObject);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00064   
00066 
00073   virtual void TessellateFace(vtkGenericAdaptorCell *cell,
00074                               vtkGenericAttributeCollection *att,
00075                               vtkIdType index,
00076                               vtkDoubleArray *points,
00077                               vtkCellArray *cellArray,
00078                               vtkPointData *internalPd)=0;
00080 
00082 
00088   virtual void Tessellate(vtkGenericAdaptorCell *cell,
00089                           vtkGenericAttributeCollection *att,
00090                           vtkDoubleArray *points, 
00091                           vtkCellArray *cellArray,
00092                           vtkPointData *internalPd )=0;
00094 
00096 
00102   virtual void Triangulate(vtkGenericAdaptorCell *cell,
00103                            vtkGenericAttributeCollection *att,
00104                            vtkDoubleArray *points,
00105                            vtkCellArray *cellArray,
00106                            vtkPointData *internalPd)=0;
00108 
00110 
00113   virtual void SetErrorMetrics(vtkCollection *someErrorMetrics);
00114   vtkGetObjectMacro(ErrorMetrics,vtkCollection);
00116   
00118   virtual void Initialize(vtkGenericDataSet *ds)=0;
00119   
00122   void InitErrorMetrics(vtkGenericDataSet *ds);
00123   
00125 
00126   int GetMeasurement();
00127   void SetMeasurement(int flag);
00129   
00133   void GetMaxErrors(double *errors);
00134   
00135 protected:
00136   vtkGenericCellTessellator();
00137   ~vtkGenericCellTessellator();
00138   
00140 
00152   int RequiresEdgeSubdivision(double *left, double *mid, double *right,
00153                               double alpha);
00155   
00156   
00158 
00167   virtual void UpdateMaxError(double *leftPoint, double *midPoint,
00168                               double *rightPoint, double alpha);
00170   
00173   void ResetMaxErrors();
00174   
00176   vtkCollection *ErrorMetrics;
00177   
00181   void SetGenericCell(vtkGenericAdaptorCell *cell);
00182   
00183   vtkGenericDataSet *DataSet;
00184   
00185   int Measurement; // if true, measure the quality of the fixed subdivision.
00186   double *MaxErrors; // max error for each error metric, for measuring the
00187   // quality of a fixed subdivision.
00188   int MaxErrorsCapacity;
00189   
00190 private:
00191   vtkGenericCellTessellator(const vtkGenericCellTessellator&);  // Not implemented.
00192   void operator=(const vtkGenericCellTessellator&);  // Not implemented.
00193 };
00194 
00195 #endif

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