Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkViewDependentErrorMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkViewDependentErrorMetric.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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   // used to get display coordinates from world coordinates
00127   vtkCoordinate *Coordinate; 
00128   
00129 private:
00130   vtkViewDependentErrorMetric(const vtkViewDependentErrorMetric&);  // Not implemented.
00131   void operator=(const vtkViewDependentErrorMetric&);  // Not implemented.
00132 };
00133 
00134 #endif

Generated on Mon Jan 21 23:07:21 2008 for VTK by  doxygen 1.4.3-20050530