VTK
dox/Charts/Core/vtkAxisExtended.h
Go to the documentation of this file.
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 "vtkChartsCoreModule.h" // For export macro
00031 #include "vtkObject.h"
00032 #include "vtkVector.h" // Needed for vtkVector
00033 
00034 class VTKCHARTSCORE_EXPORT vtkAxisExtended : public vtkObject
00035 {
00036 public:
00037    vtkTypeMacro(vtkAxisExtended, vtkObject);
00038    static vtkAxisExtended *New();
00039    virtual void PrintSelf(ostream& os, vtkIndent indent);
00040 
00042 
00044    static double Simplicity(int qIndex, int qLength, int j, double lmin,
00045                             double lmax, double lstep);
00047 
00050    static double SimplicityMax(int qIndex, int qLength, int j);
00051 
00054    static double Coverage(double dmin, double dmax, double lmin, double lmax);
00055 
00058    static double CoverageMax(double dmin, double dmax, double span);
00059 
00061 
00063    static double Density(int k, double m, double dmin, double dmax,
00064                          double lmin, double lmax);
00066 
00069    static double DensityMax(int k, double m);
00070 
00072    static double FormatLegibilityScore(double n, int format);
00073 
00075    static int FormatStringLength(int format, double n, int precision);
00076 
00078 
00081    vtkVector3d GenerateExtendedTickLabels(double dmin, double dmax, double m,
00082                                           double scaling);
00084 
00086 
00087    vtkGetMacro(FontSize, int);
00088    vtkSetMacro(FontSize, int);
00090 
00091    vtkGetMacro(DesiredFontSize, int);
00092    vtkSetMacro(DesiredFontSize, int);
00093 
00094    vtkGetMacro(Precision, int);
00095    vtkSetMacro(Precision, int);
00096    vtkGetMacro(LabelFormat, int);
00097    vtkSetMacro(LabelFormat, int);
00098 
00099    vtkGetMacro(Orientation, int);
00100    vtkSetMacro(Orientation, int);
00101 
00102    vtkGetMacro(IsAxisVertical, bool);
00103    vtkSetMacro(IsAxisVertical, bool);
00104 
00105 protected:
00106   vtkAxisExtended();
00107   ~vtkAxisExtended();
00108 
00110 
00112   double Legibility(double lmin, double lmax, double lstep, double scaling,
00113                     vtkVector<int, 3>& parameters);
00115 
00116   int Orientation;
00117   int FontSize;
00118   int DesiredFontSize;
00119   int Precision;
00120   int LabelFormat;
00121   bool LabelLegibilityChanged;
00122   bool IsAxisVertical;
00123 
00124 private:
00125   vtkAxisExtended(const vtkAxisExtended&); // Not implemented.
00126   void operator=(const vtkAxisExtended&);  // Not implemented.
00127 };