VTK  9.3.20240418
vtkGeometricErrorMetric.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkGeometricErrorMetric_h
20 #define vtkGeometricErrorMetric_h
21 
22 #include "vtkCommonDataModelModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkGenericDataSet;
27 
28 class VTKCOMMONDATAMODEL_EXPORT vtkGeometricErrorMetric : public vtkGenericSubdivisionErrorMetric
29 {
30 public:
36 
38 
42  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
51  vtkGetMacro(AbsoluteGeometricTolerance, double);
53 
63 
72 
92  double* leftPoint, double* midPoint, double* rightPoint, double alpha) override;
93 
107  double GetError(double* leftPoint, double* midPoint, double* rightPoint, double alpha) override;
108 
112  int GetRelative();
113 
114 protected:
117 
123  double Distance2LinePoint(double x[3], double y[3], double z[3]);
124 
126  double SmallestSize;
127  int Relative; // Control the type of output of GetError()
128 
129 private:
131  void operator=(const vtkGeometricErrorMetric&) = delete;
132 };
133 
134 VTK_ABI_NAMESPACE_END
135 #endif
defines dataset interface
Objects that compute error during cell tessellation.
Objects that compute geometry-based error during cell tessellation.
void SetRelativeGeometricTolerance(double value, vtkGenericDataSet *ds)
Set the geometric accuracy with a value relative to the length of the bounding box of the dataset.
int GetRelative()
Return the type of output of GetError()
~vtkGeometricErrorMetric() override
static vtkGeometricErrorMetric * New()
Construct the error metric with a default squared absolute geometric accuracy equal to 1.
void SetAbsoluteGeometricTolerance(double value)
Set the geometric accuracy with a squared absolute value.
double Distance2LinePoint(double x[3], double y[3], double z[3])
Square distance between a straight line (defined by points x and y) and a point z.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK type and error macros.
int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint, double alpha) override
Does the edge need to be subdivided according to the distance between the line passing through its en...
double GetError(double *leftPoint, double *midPoint, double *rightPoint, double alpha) override
Return the error at the mid-point.
a simple class to control print indentation
Definition: vtkIndent.h:108
@ value
Definition: vtkX3D.h:220
@ alpha
Definition: vtkX3D.h:250