VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCellLocator.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 =========================================================================*/ 00026 #ifndef __vtkAxisExtended_h 00027 #define __vtkAxisExtended_h 00028 #endif 00029 00030 #include "vtkObject.h" 00031 #include "vtkVector.h" // Needed for vtkVector 00032 // 00033 #ifndef DBL_EPSILON 00034 # define VTK_DBL_EPSILON 2.2204460492503131e-16 00035 #else // DBL_EPSILON 00036 # define VTK_DBL_EPSILON DBL_EPSILON 00037 #endif // DBL_EPSILON 00038 00039 class VTK_CHARTS_EXPORT vtkAxisExtended : public vtkObject 00040 { 00041 public: 00042 vtkTypeMacro(vtkAxisExtended, vtkObject); 00043 static vtkAxisExtended *New(); 00044 virtual void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00049 static double Simplicity(int qIndex, int qLength, int j, double lmin, 00050 double lmax, double lstep); 00052 00055 static double SimplicityMax(int qIndex, int qLength, int j); 00056 00059 static double Coverage(double dmin, double dmax, double lmin, double lmax); 00060 00063 static double CoverageMax(double dmin, double dmax, double span); 00064 00066 00068 static double Density(int k, double m, double dmin, double dmax, 00069 double lmin, double lmax); 00071 00074 static double DensityMax(int k, double m); 00075 00077 static double FormatLegibilityScore(double n, int format); 00078 00080 static int FormatStringLength(int format, double n, int precision); 00081 00083 00086 vtkVector3d GenerateExtendedTickLabels(double dmin, double dmax, double m, 00087 double scaling); 00089 00091 00092 vtkGetMacro(FontSize, int); 00093 vtkSetMacro(FontSize, int); 00095 00096 vtkGetMacro(DesiredFontSize, int); 00097 vtkSetMacro(DesiredFontSize, int); 00098 00099 vtkGetMacro(Precision, int); 00100 vtkSetMacro(Precision, int); 00101 vtkGetMacro(LabelFormat, int); 00102 vtkSetMacro(LabelFormat, int); 00103 00104 vtkGetMacro(Orientation, int); 00105 vtkSetMacro(Orientation, int); 00106 00107 vtkGetMacro(IsAxisVertical, bool); 00108 vtkSetMacro(IsAxisVertical, bool); 00109 00110 protected: 00111 vtkAxisExtended(); 00112 ~vtkAxisExtended(); 00113 00115 00117 double Legibility(double lmin, double lmax, double lstep, double scaling, 00118 vtkVector<int, 3>& parameters); 00120 00121 int Orientation; 00122 int FontSize; 00123 int DesiredFontSize; 00124 int Precision; 00125 int LabelFormat; 00126 bool LabelLegibilityChanged; 00127 bool IsAxisVertical; 00128 00129 private: 00130 vtkAxisExtended(const vtkAxisExtended&); // Not implemented. 00131 void operator=(const vtkAxisExtended&); // Not implemented. 00132 };