00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00030 #ifndef __vtkAttributesErrorMetric_h
00031 #define __vtkAttributesErrorMetric_h
00032 
00033 #include "vtkGenericSubdivisionErrorMetric.h"
00034 
00035 class vtkGenericAttributeCollection;
00036 class vtkGenericDataSet;
00037 
00038 class VTK_FILTERING_EXPORT vtkAttributesErrorMetric : public vtkGenericSubdivisionErrorMetric
00039 {
00040 public:
00043   static vtkAttributesErrorMetric *New();
00044   
00046 
00047   vtkTypeMacro(vtkAttributesErrorMetric,vtkGenericSubdivisionErrorMetric);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00050   
00052 
00057   vtkGetMacro(AbsoluteAttributeTolerance, double);
00059   
00067   void SetAbsoluteAttributeTolerance(double value);
00068   
00070 
00075   vtkGetMacro(AttributeTolerance, double);
00077   
00081   void SetAttributeTolerance(double value);
00082 
00084 
00098   int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint,
00099                               double alpha);
00101   
00103 
00112   double GetError(double *leftPoint, double *midPoint,
00113                   double *rightPoint, double alpha);
00115   
00116 protected:
00117   vtkAttributesErrorMetric();
00118   virtual ~vtkAttributesErrorMetric();
00119   
00122   void ComputeSquareAbsoluteAttributeTolerance();
00123   
00124   double AttributeTolerance;
00125   
00126   double SquareAbsoluteAttributeTolerance; 
00127   
00128   
00129   double AbsoluteAttributeTolerance;
00130   int DefinedByAbsolute;
00131   
00132   vtkTimeStamp SquareAbsoluteAttributeToleranceComputeTime;
00133   
00134   double Range; 
00135   
00136   vtkGenericAttributeCollection *AttributeCollection;
00137 
00138 private:
00139   vtkAttributesErrorMetric(const vtkAttributesErrorMetric&);  
00140   void operator=(const vtkAttributesErrorMetric&);  
00141 };
00142 
00143 #endif
00144