Plot.h

00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef PlotH
00004 #define PlotH
00005 
00006 #include "WorkerBase.h"
00007 #include <math.h>
00032 class clPlot : public clWorkerBase {
00033 
00034  public:
00035 
00039  ~clPlot();
00040 
00046  clPlot(clSimManager *p_oSimManager);
00047  //clPlot(const clPlot &oldPlot); //copy constructor
00048 
00053  int GetObjectVersion() {return 1;};
00054 
00060  float GetLatitude() {return m_fLatitude;};
00061 
00067  float GetXPlotLength() {return m_fPlotLenX;};
00068 
00074  float GetYPlotLength() {return m_fPlotLenY;};
00075 
00081  float GetXCellLength() {return m_iCellSize;};
00082 
00088  float GetYCellLength() {return m_iCellSize;};
00089 
00095  float GetPlotArea() {return m_fPlotArea;};
00096 
00102  char* GetPlotTitle() {return m_cPlotTitle;};
00103 
00109  int GetNumXGrids() {return m_iNumXGrids;};
00110 
00116  int GetNumYGrids() {return m_iNumYGrids;};
00117 
00123  float GetGridCellArea() {return m_iCellSize * m_iCellSize;};
00124 
00130  int GetGridCellSize() {return m_iCellSize;};
00131 
00147  float CorrectX(float fX);
00148 
00164  float CorrectY(float fY);
00165 
00178  float GetDistance(float fFromX, float fFromY, float fToX, float fToY);
00179 
00188  float GetAzimuthAngle(float fFromX, float fFromY, float fToX, float fToY);
00189 
00198  int GetFastAzimuthAngle(float fFromX, float fFromY, float fToX, float fToY);
00199 
00214  float GetUncorrectedX(float fFromX, float fAzimuth, float fDistance);
00215 
00230  float GetUncorrectedY(float fFromY, float fAzimuth, float fDistance);
00231 
00241  inline float GetXDistance(float fFromX, float fToX) {
00242    float fTemp2, fTemp1 = fToX - fFromX;
00243    if (fTemp1 < 0) fTemp2 = (fToX + m_fPlotLenX) - fFromX;
00244    else fTemp2 = fToX - (fFromX + m_fPlotLenX);
00245    if (fabs(fTemp1) < fabs(fTemp2)) return fTemp1;
00246    else return fTemp2;
00247  };
00248 
00258  inline float GetYDistance(float fFromY, float fToY) {
00259    float fTemp2, fTemp1 = fToY - fFromY;
00260    if (fTemp1 < 0) fTemp2 = (fToY + m_fPlotLenY) - fFromY;
00261    else fTemp2 = fToY - (fFromY + m_fPlotLenY);
00262    if (fabs(fTemp1) < fabs(fTemp2)) return fTemp1;
00263    else return fTemp2;
00264  };
00265 
00266  protected:
00267 
00273  void GetData(xercesc::DOMDocument *p_oDoc);
00274 
00278  void PopulateAziTans();
00279 
00280  char m_cPlotTitle[MAX_PLOTTITLE_SIZE]; 
00281  int m_iNumXGrids;  
00282  int m_iNumYGrids;  
00283  int m_iCellSize; 
00286  float m_fPlotArea;   
00287  float m_fPlotLenX;  
00288  float m_fPlotLenY;  
00289  float m_fMaxX;      
00290  float m_fMaxY;      
00291  float m_fLatitude;   
00292  float *mp_fAziTans; 
00294 }  ;
00295 //---------------------------------------------------------------------------
00296 #endif

Generated on Thu Jan 26 13:44:34 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.6-NO