VTK
vtkAttributesErrorMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAttributesErrorMetric.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkAttributesErrorMetric_h
32 #define vtkAttributesErrorMetric_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
36 
38 class vtkGenericDataSet;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkAttributesErrorMetric : public vtkGenericSubdivisionErrorMetric
41 {
42 public:
48 
50 
54  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
56 
58 
66  vtkGetMacro(AbsoluteAttributeTolerance, double);
68 
80 
82 
90  vtkGetMacro(AttributeTolerance, double);
92 
99 
119  int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint,
120  double alpha) VTK_OVERRIDE;
121 
135  double GetError(double *leftPoint, double *midPoint,
136  double *rightPoint, double alpha) VTK_OVERRIDE;
137 
138 protected:
141 
146  void ComputeSquareAbsoluteAttributeTolerance();
147 
148  double AttributeTolerance;
149 
150  double SquareAbsoluteAttributeTolerance; // cached value computed from
151  // AttributeTolerance and active attribute/component
152 
153  double AbsoluteAttributeTolerance;
154  int DefinedByAbsolute;
155 
156  vtkTimeStamp SquareAbsoluteAttributeToleranceComputeTime;
157 
158  double Range; // cached value computed from active attribute/component
159 
160  vtkGenericAttributeCollection *AttributeCollection;
161 
162 private:
163  vtkAttributesErrorMetric(const vtkAttributesErrorMetric&) VTK_DELETE_FUNCTION;
164  void operator=(const vtkAttributesErrorMetric&) VTK_DELETE_FUNCTION;
165 };
166 
167 #endif
168 
Objects that compute attribute-based error during cell tessellation.
void SetAttributeTolerance(double value)
Set the relative attribute accuracy to ‘value’.
~vtkAttributesErrorMetric() override
double GetError(double *leftPoint, double *midPoint, double *rightPoint, double alpha) override
Return the error at the mid-point.
int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint, double alpha) override
Does the edge need to be subdivided according to the distance between the value of the active attribu...
static vtkAttributesErrorMetric * New()
Construct the error metric with a default relative attribute accuracy equal to 0.1.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetAbsoluteAttributeTolerance(double value)
Set the absolute attribute accuracy to ‘value’.
defines dataset interface
Objects that compute error during cell tessellation.
a simple class to control print indentation
Definition: vtkIndent.h:40
record modification and/or execution time
Definition: vtkTimeStamp.h:36
@ value
Definition: vtkX3D.h:220
@ alpha
Definition: vtkX3D.h:250