forked from alexgoussev/TrackProcessor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cells.h
41 lines (35 loc) · 1.14 KB
/
Cells.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//---------------------------------------------------------------------------
#ifndef CellsH
#define CellsH
//---------------------------------------------------------------------------
#define CELL_SIZE 16
struct tagCellPoint {
int nPoint;
int nX;
int nY;
};
typedef tagCellPoint* PCellPoint;
typedef TList* PList;
class TCells {
public:
__fastcall TCells(int nWidth, int nHeight);
__fastcall ~TCells();
__property PList Cell[int i][int j] = { read=GetCell, write=SetCell };
__property PList CellXY[int x][int y] = { read=GetCellXY, write=SetCellXY };
__property int Point[int x][int y] = { write=SetPoint };
__property int NearestPoint[int x][int y] = { read=GetNearestPoint };
protected:
int m_nCellsX;
int m_nCellsY;
PList * m_pCellsList;
static double m_dDistances[CELL_SIZE][CELL_SIZE];
static bool m_bDistCalc;
private:
PList __fastcall GetCell(int i, int j);
void __fastcall SetCell(int i, int j, PList pList);
PList __fastcall GetCellXY(int x, int y);
void __fastcall SetCellXY(int x, int y, PList pList);
void __fastcall SetPoint(int x, int y, int n);
int __fastcall GetNearestPoint(int x, int y);
};
#endif