VTK
dox/Common/DataModel/vtkGenericSubdivisionErrorMetric.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGenericSubdivisionErrorMetric.h
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 =========================================================================*/
00037 #ifndef __vtkGenericSubdivisionErrorMetric_h
00038 #define __vtkGenericSubdivisionErrorMetric_h
00039 
00040 #include "vtkCommonDataModelModule.h" // For export macro
00041 #include "vtkObject.h"
00042 
00043 class vtkGenericAttributeCollection;
00044 class vtkGenericAdaptorCell;
00045 class vtkGenericDataSet;
00046 
00047 class VTKCOMMONDATAMODEL_EXPORT vtkGenericSubdivisionErrorMetric : public vtkObject
00048 {
00049 public:
00051 
00052   vtkTypeMacro(vtkGenericSubdivisionErrorMetric,vtkObject);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057 
00070   virtual int RequiresEdgeSubdivision(double *leftPoint, double *midPoint,
00071                                       double *rightPoint, double alpha)=0;
00073 
00075 
00084   virtual double GetError(double *leftPoint, double *midPoint,
00085                           double *rightPoint, double alpha)=0;
00087 
00089 
00090   void SetGenericCell(vtkGenericAdaptorCell *cell);
00091   vtkGetObjectMacro(GenericCell,vtkGenericAdaptorCell);
00093 
00095 
00096   void SetDataSet(vtkGenericDataSet *ds);
00097   vtkGetObjectMacro(DataSet,vtkGenericDataSet);
00099 
00100 protected:
00101   vtkGenericSubdivisionErrorMetric();
00102   ~vtkGenericSubdivisionErrorMetric();
00103 
00104   vtkGenericAdaptorCell *GenericCell;
00105   vtkGenericDataSet *DataSet;
00106 
00107 private:
00108   vtkGenericSubdivisionErrorMetric(const vtkGenericSubdivisionErrorMetric&);  // Not implemented.
00109   void operator=(const vtkGenericSubdivisionErrorMetric&);  // Not implemented.
00110 };
00111 
00112 #endif