VTK  9.1.0
vtkViewDependentErrorMetric.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkViewDependentErrorMetric.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=========================================================================*/
29#ifndef vtkViewDependentErrorMetric_h
30#define vtkViewDependentErrorMetric_h
31
33#include "vtkRenderingCoreModule.h" // For export macro
34
35class vtkViewport;
36class vtkCoordinate;
37
39{
40public:
46
48
52 void PrintSelf(ostream& os, vtkIndent indent) override;
54
56
65 vtkGetMacro(PixelTolerance, double);
67
76 void SetPixelTolerance(double value);
77
79
83 vtkGetObjectMacro(Viewport, vtkViewport);
84 void SetViewport(vtkViewport* viewport);
86
107 double* leftPoint, double* midPoint, double* rightPoint, double alpha) override;
108
122 double GetError(double* leftPoint, double* midPoint, double* rightPoint, double alpha) override;
123
124protected:
127
133 double Distance2LinePoint(double x[2], double y[2], double z[2]);
134
137 // used to get display coordinates from world coordinates
139
140private:
142 void operator=(const vtkViewDependentErrorMetric&) = delete;
143};
144
145#endif
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Objects that compute error during cell tessellation.
a simple class to control print indentation
Definition: vtkIndent.h:113
Objects that compute a screen-based error during cell tessellation.
double GetError(double *leftPoint, double *midPoint, double *rightPoint, double alpha) override
Return the error at the mid-point.
static vtkViewDependentErrorMetric * New()
Construct the error metric with a default squared screen-based geometric accuracy measured in pixels ...
void SetPixelTolerance(double value)
Set the squared screen-based geometric accuracy measured in pixels.
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...
~vtkViewDependentErrorMetric() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK type and error macros.
void SetViewport(vtkViewport *viewport)
Set/Get the renderer with ‘renderer’ on which the error metric is based.
double Distance2LinePoint(double x[2], double y[2], double z[2])
Square distance between a straight line (defined by points x and y) and a point z.
abstract specification for Viewports
Definition: vtkViewport.h:47