VTK
dox/Common/DataModel/vtkAttributesErrorMetric.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAttributesErrorMetric.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 =========================================================================*/
00030 #ifndef __vtkAttributesErrorMetric_h
00031 #define __vtkAttributesErrorMetric_h
00032 
00033 #include "vtkCommonDataModelModule.h" // For export macro
00034 #include "vtkGenericSubdivisionErrorMetric.h"
00035 
00036 class vtkGenericAttributeCollection;
00037 class vtkGenericDataSet;
00038 
00039 class VTKCOMMONDATAMODEL_EXPORT vtkAttributesErrorMetric : public vtkGenericSubdivisionErrorMetric
00040 {
00041 public:
00044   static vtkAttributesErrorMetric *New();
00045 
00047 
00048   vtkTypeMacro(vtkAttributesErrorMetric,vtkGenericSubdivisionErrorMetric);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00058   vtkGetMacro(AbsoluteAttributeTolerance, double);
00060 
00068   void SetAbsoluteAttributeTolerance(double value);
00069 
00071 
00076   vtkGetMacro(AttributeTolerance, double);
00078 
00082   void SetAttributeTolerance(double value);
00083 
00085 
00099   int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint,
00100                               double alpha);
00102 
00104 
00113   double GetError(double *leftPoint, double *midPoint,
00114                   double *rightPoint, double alpha);
00116 
00117 protected:
00118   vtkAttributesErrorMetric();
00119   virtual ~vtkAttributesErrorMetric();
00120 
00123   void ComputeSquareAbsoluteAttributeTolerance();
00124 
00125   double AttributeTolerance;
00126 
00127   double SquareAbsoluteAttributeTolerance; // cached value computed from
00128   // AttributeTolerance and active attribute/component
00129 
00130   double AbsoluteAttributeTolerance;
00131   int DefinedByAbsolute;
00132 
00133   vtkTimeStamp SquareAbsoluteAttributeToleranceComputeTime;
00134 
00135   double Range; // cached value computed from active attribute/component
00136 
00137   vtkGenericAttributeCollection *AttributeCollection;
00138 
00139 private:
00140   vtkAttributesErrorMetric(const vtkAttributesErrorMetric&);  // Not implemented.
00141   void operator=(const vtkAttributesErrorMetric&);  // Not implemented.
00142 };
00143 
00144 #endif
00145