00001 /* -*- mode: c++ -*- */ 00002 00014 #ifndef _Lambert_H_ 00015 #define _Lambert_H_ 00016 00017 #include "PeriodicBinaryTransform.h" 00018 00019 class AxisTick; 00020 00029 class MDL_HIPPOPLOT_API Lambert : public PeriodicBinaryTransform 00030 { 00031 00032 private: 00033 00036 std::vector < AxisTick > m_ticks; 00037 00039 void setTickStep( AxisModelBase & axis ); 00040 00042 void setFirstTick( AxisModelBase & axis ); 00043 00045 const std::vector < AxisTick > & 00046 genTicks ( AxisModelBase & axis, hippodraw::Axes::Type axistype ); 00047 00048 public: 00049 00052 Lambert ( UnaryTransform * z ); 00053 00055 Lambert ( const Lambert & ); 00056 00058 virtual ~Lambert(); 00059 00061 #ifdef CLONE_DEFECT 00062 virtual TransformBase * clone () const; 00063 #else 00064 virtual Lambert * clone () const; 00065 #endif 00066 00067 virtual bool isLinearInXY () const; 00068 00069 /* It should be noted that we need to explicitly take care of offset 00070 because the following transform assumes that all the points given 00071 to it are such that they have ALREADY been altered to take care 00072 of offset 00073 */ 00074 virtual void transform ( double & lon, double & lat ) const; 00075 00076 /* It should be noted that we need to explicitly take care of offset 00077 because the following inverse transform assumes that all the points 00078 returned by it r such that they SHALL be altered to take care of offset */ 00079 virtual void inverseTransform ( double & lon, double & lat ) const; 00080 00081 /* It should be noted that we need to explicitly take care of offset 00082 because the following transform assumes that all the points given to 00083 it are such that they have ALREADY been altered to take care of offset */ 00084 virtual void transform ( std::vector< double > & lon, 00085 std::vector< double > & lat ) const; 00086 00087 virtual double aspectRatio () const; 00088 00089 virtual HippoRectangle calcRectangle ( const Range & x, 00090 const Range & y ); 00091 00092 virtual void validate ( Range & lat, Range & lon ) const; 00093 00094 virtual const std::vector < AxisTick > & 00095 setTicks ( AxisModelBase & axis_model, hippodraw::Axes::Type axis ); 00096 00100 virtual void adjustValues ( AxisModelBase & model, 00101 hippodraw::Axes::Type axes, 00102 const Range & limit ); 00103 }; 00104 00105 #endif // _Lambert_H_