Main Page   Compound List   File List   Compound Members  

CellGrid.h

00001 #if !defined(__CELLGRID_H)
00002 #define __CELLGRID_H
00003 
00004 #include "MyMathUtils.h"
00005 #include "Cell.h"
00006 
00007 
00012 class CellGrid
00013 {
00014 public:
00015 
00016         int col;       //number of columns used for superimposed grid
00017         int row;       //number of rows used for superimposed grid
00018         Cell *grid;    //pointer to array of cells = superimposed grid
00019 
00024         CellGrid()
00025         {
00026                 Initialize();
00027         }
00028 
00033         virtual ~CellGrid()
00034         {
00035                 Destroy();
00036         }
00037 
00041         void initGrid(int dsep);
00042 
00047         void initCellList();
00048 
00052         void getCellAddress(int x, int y);
00053 
00054 private:
00055 
00059         void Initialize();
00060         
00064         void Destroy();
00065         
00066         
00071         bool checkCellAddress(int x, int y, int old_adr);
00072         
00076         void getSurroundingAddresses(int adr);
00077         
00082         void fillCellListWithInvalid(int start);
00083 };
00084 #endif //#if !defined(__CELLGRID_H)

Generated on Tue Jan 22 19:13:37 2002 for FlowViz by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001