VTK
vtkAxisExtended.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCellLocator.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 =========================================================================*/
26 #ifndef __vtkAxisExtended_h
27 #define __vtkAxisExtended_h
28 #endif
29 
30 #include "vtkObject.h"
31 #include "vtkVector.h" // Needed for vtkVector
32 //
33 #ifndef DBL_EPSILON
34 # define VTK_DBL_EPSILON 2.2204460492503131e-16
35 #else // DBL_EPSILON
36 # define VTK_DBL_EPSILON DBL_EPSILON
37 #endif // DBL_EPSILON
38 
40 {
41 public:
42  vtkTypeMacro(vtkAxisExtended, vtkObject);
43  static vtkAxisExtended *New();
44  virtual void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
49  static double Simplicity(int qIndex, int qLength, int j, double lmin,
50  double lmax, double lstep);
52 
55  static double SimplicityMax(int qIndex, int qLength, int j);
56 
59  static double Coverage(double dmin, double dmax, double lmin, double lmax);
60 
63  static double CoverageMax(double dmin, double dmax, double span);
64 
66 
68  static double Density(int k, double m, double dmin, double dmax,
69  double lmin, double lmax);
71 
74  static double DensityMax(int k, double m);
75 
77  static double FormatLegibilityScore(double n, int format);
78 
80  static int FormatStringLength(int format, double n, int precision);
81 
83 
86  vtkVector3d GenerateExtendedTickLabels(double dmin, double dmax, double m,
87  double scaling);
89 
91 
92  vtkGetMacro(FontSize, int);
93  vtkSetMacro(FontSize, int);
95 
96  vtkGetMacro(DesiredFontSize, int);
97  vtkSetMacro(DesiredFontSize, int);
98 
99  vtkGetMacro(Precision, int);
100  vtkSetMacro(Precision, int);
101  vtkGetMacro(LabelFormat, int);
102  vtkSetMacro(LabelFormat, int);
103 
104  vtkGetMacro(Orientation, int);
105  vtkSetMacro(Orientation, int);
106 
107  vtkGetMacro(IsAxisVertical, bool);
108  vtkSetMacro(IsAxisVertical, bool);
109 
110 protected:
111  vtkAxisExtended();
112  ~vtkAxisExtended();
113 
115 
117  double Legibility(double lmin, double lmax, double lstep, double scaling,
118  vtkVector<int, 3>& parameters);
120 
122  int FontSize;
128 
129 private:
130  vtkAxisExtended(const vtkAxisExtended&); // Not implemented.
131  void operator=(const vtkAxisExtended&); // Not implemented.
132 };