00001 /*************************************************************************** 00002 cgridposition.h - Integer position on the surface grid 00003 ------------------- 00004 begin : zo dec 9 2007 00005 copyright : (C) 2007 by CJP 00006 email : cornware-cjp@users.sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef LIBPROCTERCGRIDPOSITION_H 00018 #define LIBPROCTERCGRIDPOSITION_H 00019 00020 #include <libprocter/cvector.h> 00021 #include <libprocter/cmatrix.h> 00022 00023 namespace libProcTer { 00024 00053 class CGridPosition 00054 { 00055 public: 00057 CGridPosition(); 00059 CGridPosition(unsigned int arg_T, int arg_u, int arg_v); 00065 CGridPosition(CGridPosition p1, CGridPosition p2); 00066 00073 bool operator==(const CGridPosition &p) const; 00075 inline bool operator!=(const CGridPosition &p) const 00076 {return !operator==(p);} 00077 00079 double getLatitude() const; 00081 double getLongitude() const; 00082 00084 CVector getDirection() const; 00088 CMatrix getOrientation() const; 00089 00095 double getScale() const; 00096 00098 CGridPosition getParentGridPos() const; 00099 00101 00102 00103 CGridPosition getLeftPos() const; 00105 CGridPosition getRightPos() const; 00107 CGridPosition getTopPos() const; 00109 CGridPosition getBottomPos() const; 00111 00126 bool makeLowerLevel(bool force=false); 00128 void makeHigherLevel(); 00129 00131 unsigned int T; 00133 unsigned int N; 00135 int u; 00137 int v; 00138 }; 00139 00140 } 00141 00142 #endif