DeadReckoning.h

Go to the documentation of this file.
00001 
00030 #ifndef DeadReckoning_h
00031 #define DeadReckoning_h
00032 
00033 #include "DistanceTransform.h"
00034 #include <iostream>
00035 using namespace std;
00036 //----------------------------------------------------------------------
00038 class DeadReckoning : public DistanceTransform {
00039 
00040 public:
00041     DeadReckoning ( const int xSize, const int ySize, const bool unload=true )
00042         : DistanceTransform(xSize, ySize, unload)
00043     {
00044     }
00045 
00047 
00054     virtual inline bool getP ( const int x, const int y, int& px, int& py ) const {
00055         if (p==NULL)    return false;
00056         const int s = sub(x,y);
00057         px = p[s].x;
00058         py = p[s].y;
00059         return true;
00060     }
00061 
00062 protected:
00063     P *p;
00064 };
00065 
00066 #endif
00067 //----------------------------------------------------------------------
00068 

Generated on Thu Jan 12 10:28:42 2006 by  doxygen 1.4.5