proj home

Files   Classes   Functions   Hierarchy  

windowscaleD2.h

Go to the documentation of this file.
00001 #ifndef WINDOWSCALED2_H
00002 #define WINDOWSCALED2_H
00003 
00004 #include <typedefs.h>
00005 
00006 // TODO static global windows quad1, quad2, quad3, quad4
00007 //   (-1,-1)(1,1) window, (-0.5,-0.5)(0.5,0.5) window
00008 
00009 // TODO - axes eg x=0 line
00010 //             y=5
00011 // Notches in axes.
00012 // Label axes, spec this and document.
00013 
00022 class windowscaleD2
00023 {
00024 public:
00025 
00027   static windowscaleD2 unit;
00028 
00030   static windowscaleD2 unitcentered;
00031 
00033   double xmin;
00035   double ymin;
00037   double xmax;
00039   double ymax;
00040 
00042   windowscaleD2();
00043 
00045   windowscaleD2
00046   (
00047     doublec xmin_, 
00048     doublec xmax_, 
00049     doublec ymin_, 
00050     doublec ymax_ 
00051   );
00052 
00054   void construct
00055   (
00056     doublec xmin_, 
00057     doublec xmax_, 
00058     doublec ymin_, 
00059     doublec ymax_ 
00060   );
00061 
00063   double oneoverxlength;
00065   double oneoverylength;
00066 
00068   doublec widthoverheight() const;
00070   doublec heightoverwidth() const;
00071 
00073   boolc isinside(doublec x, doublec y) const;
00074 
00075 
00077   void update();
00078 
00080   boolc convertfrom
00081   (
00082     double & x, 
00083     double & y, 
00084     windowscaleD2 const & w2
00085   ) const;
00086 
00088   boolc unitscale(double & x, double & y) const;
00090   void unitscaleInverse(double & x, double & y) const;
00092   void unitscaleInverse_x(double & x) const;
00094   void unitscaleInverse_y(double & y) const;
00095 
00097   void shiftx(doublec x);
00099   void shifty(doublec y);
00101   void shiftxy(doublec x, doublec y);
00102 
00105   void shiftquadrant1();
00108   void shiftquadrant2();
00111   void shiftquadrant3();
00114   void shiftquadrant4();
00116   void shiftcenterx();
00118   void shiftcentery();
00120   void shiftcenterxy();
00121 
00123   void scalex(doublec scale);
00125   void scaley(doublec scale);
00127   void scalexy(doublec scale);
00128 
00130   operator stringc() const;
00132   void serializeInverse(stringc & s);
00133 
00135   void unitwindow();
00136 };
00137 
00138 #endif
00139 
00140 

Generated on Fri Mar 4 00:49:27 2011 for Chelton Evans Source by  doxygen 1.5.8