2 * $Logfile: /Freespace2/code/Mission/MissionGrid.h $
7 * Type and defines for grids
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 2 10/07/98 10:53a Dave
17 * 1 10/07/98 10:49a Dave
19 * 6 10/03/97 8:55a John
20 * moved Fred's grid_render code out of MissionGrid and into Fred. Added
21 * code to turn background under overlays grey.
23 * 5 7/14/97 12:04a Lawrance
24 * added function that navmap calls to draw elevation lines
26 * 4 6/18/97 11:36p Lawrance
27 * move grid rendering code to MissionGrid.cpp
29 * 3 6/12/97 11:25a Lawrance
30 * added grid_read_camera_controls()
32 * 2 6/12/97 9:58a Lawrance
33 * holds grid specific types and #defines
35 * 1 6/12/97 9:51a Lawrance
41 #ifndef __MISSIONGRID_H__
42 #define __MISSIONGRID_H__
44 #define MAX_GRIDLINE_POINTS 201
45 #define L_MAX_LINES 128
53 float planeD; // D component of plane equation (A, B, C are uvec in gmatrix)
54 vector gpoints1[MAX_GRIDLINE_POINTS]; // 1 -4 are edge gridpoints for small grid.
55 vector gpoints2[MAX_GRIDLINE_POINTS];
56 vector gpoints3[MAX_GRIDLINE_POINTS];
57 vector gpoints4[MAX_GRIDLINE_POINTS];
58 vector gpoints5[MAX_GRIDLINE_POINTS]; // 5-8 are edge gridpoints for large grid.
59 vector gpoints6[MAX_GRIDLINE_POINTS];
60 vector gpoints7[MAX_GRIDLINE_POINTS];
61 vector gpoints8[MAX_GRIDLINE_POINTS];
64 typedef struct tline {
65 int istart, iend, color;
68 extern grid Global_grid;
69 extern grid *The_grid;
70 extern int double_fine_gridlines;
72 void grid_read_camera_controls( control_info * ci, float frametime );
73 void maybe_create_new_grid(grid *gridp, vector *pos, matrix *orient, int force = 0);
74 grid *create_grid(grid *gridp, vector *forward, vector *right, vector *center, int nrows, int ncols, float square_size);
75 grid *create_default_grid(void);
76 void render_grid(grid *gridp);
77 void modify_grid(grid *gridp);
78 void rpd_line(vector *v0, vector *v1);
79 void grid_render_elevation_line(vector *pos, grid* gridp);