proj home

Files   Classes   Functions   Hierarchy  

d2toindex.h

Go to the documentation of this file.
00001 #ifndef D2TOINDEX_H
00002 #define D2TOINDEX_H
00003 
00004 #include <cassert>
00005 using namespace std;
00006 
00007 
00008 #include <boxcollision.h>
00009 #include <graphmisc.h>
00010 #include <particle.h>
00011 #include <typedefs.h>
00012 
00013 //  <TODO>
00014 //  Test the time difference between
00015 //  inlining the index(uintc i) const
00016 //    and getsurroundingcells(...) code in cpp file.
00017 
00018 
00026 class d2toindex
00027 {
00028 
00029   double xleninv;
00030   double yleninv;
00031 public:
00032 
00034   particle const * pi;
00035 
00037   boxcollision const & box;
00038 
00047   uint * nb;
00048 
00050   uint W;
00051 
00053   d2toindex
00054   (
00055     boxcollision const & box_
00056   );
00057 
00058   d2toindex
00059   (
00060     particle const * pi_,
00061     boxcollision const & box_
00062   );
00063 
00064 
00065   ~d2toindex();
00066   
00067   void reset();
00068 
00070   intc index(uintc i) const;
00071 
00073   void getsurroundingcells
00074   (
00075     uint * & nb_,
00076     uint & sz,
00077     uintc k
00078   );
00079 
00080 };
00081 
00082 
00083 
00084 
00085 #endif
00086 
00087 

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