VTK
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 =========================================================================*/
32 #ifndef vtkViewDependentErrorMetric_h
33 #define vtkViewDependentErrorMetric_h
34 
35 #include "vtkRenderingCoreModule.h" // For export macro
37 
38 class vtkViewport;
39 class vtkCoordinate;
40 
41 class VTKRENDERINGCORE_EXPORT vtkViewDependentErrorMetric : public vtkGenericSubdivisionErrorMetric
42 {
43 public:
49 
51 
55  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
68  vtkGetMacro(PixelTolerance, double);
70 
79  void SetPixelTolerance(double value);
80 
82 
86  vtkGetObjectMacro(Viewport,vtkViewport);
87  void SetViewport(vtkViewport *viewport);
89 
109  int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint,
110  double alpha) override;
111 
125  double GetError(double *leftPoint, double *midPoint,
126  double *rightPoint, double alpha) override;
127 
128 protected:
131 
137  double Distance2LinePoint(double x[2],
138  double y[2],
139  double z[2]);
140 
143  // used to get display coordinates from world coordinates
145 
146 private:
148  void operator=(const vtkViewDependentErrorMetric&) = delete;
149 };
150 
151 #endif
vtkViewDependentErrorMetric::Viewport
vtkViewport * Viewport
Definition: vtkViewDependentErrorMetric.h:142
vtkViewDependentErrorMetric::SetViewport
void SetViewport(vtkViewport *viewport)
vtkX3D::alpha
@ alpha
Definition: vtkX3D.h:250
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkViewDependentErrorMetric::Coordinate
vtkCoordinate * Coordinate
Definition: vtkViewDependentErrorMetric.h:144
vtkGenericSubdivisionErrorMetric
Objects that compute error during cell tessellation.
Definition: vtkGenericSubdivisionErrorMetric.h:49
vtkViewDependentErrorMetric::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkViewDependentErrorMetric::PixelTolerance
double PixelTolerance
Definition: vtkViewDependentErrorMetric.h:141
vtkViewDependentErrorMetric::SetPixelTolerance
void SetPixelTolerance(double value)
Set the squared screen-based geometric accuracy measured in pixels.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:82
vtkViewDependentErrorMetric::vtkViewDependentErrorMetric
vtkViewDependentErrorMetric()
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkViewDependentErrorMetric::~vtkViewDependentErrorMetric
~vtkViewDependentErrorMetric() override
vtkViewDependentErrorMetric::GetError
double GetError(double *leftPoint, double *midPoint, double *rightPoint, double alpha) override
Return the error at the mid-point.
vtkViewDependentErrorMetric
Objects that compute a screen-based error during cell tessellation.
Definition: vtkViewDependentErrorMetric.h:42
vtkGenericSubdivisionErrorMetric.h
vtkViewDependentErrorMetric::New
static vtkViewDependentErrorMetric * New()
Construct the error metric with a default squared screen-based geometric accuracy measured in pixels ...
vtkViewDependentErrorMetric::Distance2LinePoint
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.
vtkViewDependentErrorMetric::RequiresEdgeSubdivision
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...