00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkViewDependentErrorMetric_h
00032 #define __vtkViewDependentErrorMetric_h
00033
00034 #include "vtkGenericSubdivisionErrorMetric.h"
00035
00036 class vtkViewport;
00037 class vtkCoordinate;
00038
00039 class VTK_FILTERING_EXPORT vtkViewDependentErrorMetric : public vtkGenericSubdivisionErrorMetric
00040 {
00041 public:
00044 static vtkViewDependentErrorMetric *New();
00045
00047
00048 vtkTypeRevisionMacro(vtkViewDependentErrorMetric,vtkGenericSubdivisionErrorMetric);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053
00060 vtkGetMacro(PixelTolerance, double);
00062
00069 void SetPixelTolerance(double value);
00070
00072
00074 vtkGetObjectMacro(Viewport,vtkViewport);
00075 void SetViewport(vtkViewport *viewport);
00077
00079
00093 int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint,
00094 double alpha);
00096
00098
00107 double GetError(double *leftPoint, double *midPoint,
00108 double *rightPoint, double alpha);
00110
00111 protected:
00112 vtkViewDependentErrorMetric();
00113 ~vtkViewDependentErrorMetric();
00114
00116
00119 double Distance2LinePoint(double x[2],
00120 double y[2],
00121 double z[2]);
00123
00124 double PixelTolerance;
00125 vtkViewport *Viewport;
00126
00127 vtkCoordinate *Coordinate;
00128
00129 private:
00130 vtkViewDependentErrorMetric(const vtkViewDependentErrorMetric&);
00131 void operator=(const vtkViewDependentErrorMetric&);
00132 };
00133
00134 #endif