VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGeometricErrorMetric.h 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 =========================================================================*/ 00030 #ifndef __vtkGeometricErrorMetric_h 00031 #define __vtkGeometricErrorMetric_h 00032 00033 #include "vtkCommonDataModelModule.h" // For export macro 00034 #include "vtkGenericSubdivisionErrorMetric.h" 00035 00036 class vtkGenericDataSet; 00037 00038 class VTKCOMMONDATAMODEL_EXPORT vtkGeometricErrorMetric : public vtkGenericSubdivisionErrorMetric 00039 { 00040 public: 00043 static vtkGeometricErrorMetric *New(); 00044 00046 00047 vtkTypeMacro(vtkGeometricErrorMetric,vtkGenericSubdivisionErrorMetric); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 00055 vtkGetMacro(AbsoluteGeometricTolerance, double); 00057 00064 void SetAbsoluteGeometricTolerance(double value); 00065 00067 00071 void SetRelativeGeometricTolerance(double value, 00072 vtkGenericDataSet *ds); 00074 00076 00089 int RequiresEdgeSubdivision(double *leftPoint, double *midPoint, double *rightPoint, 00090 double alpha); 00092 00094 00103 double GetError(double *leftPoint, double *midPoint, 00104 double *rightPoint, double alpha); 00106 00108 int GetRelative(); 00109 00110 protected: 00111 vtkGeometricErrorMetric(); 00112 virtual ~vtkGeometricErrorMetric(); 00113 00115 00118 double Distance2LinePoint(double x[3], 00119 double y[3], 00120 double z[3]); 00122 00123 double AbsoluteGeometricTolerance; 00124 double SmallestSize; 00125 int Relative; // Control the type of output of GetError() 00126 00127 private: 00128 vtkGeometricErrorMetric(const vtkGeometricErrorMetric&); // Not implemented. 00129 void operator=(const vtkGeometricErrorMetric&); // Not implemented. 00130 }; 00131 00132 #endif