2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/Mission/MissionGrid.h $
15 * Type and defines for grids
18 * Revision 1.2 2002/06/09 04:41:13 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
25 * 2 10/07/98 10:53a Dave
28 * 1 10/07/98 10:49a Dave
30 * 6 10/03/97 8:55a John
31 * moved Fred's grid_render code out of MissionGrid and into Fred. Added
32 * code to turn background under overlays grey.
34 * 5 7/14/97 12:04a Lawrance
35 * added function that navmap calls to draw elevation lines
37 * 4 6/18/97 11:36p Lawrance
38 * move grid rendering code to MissionGrid.cpp
40 * 3 6/12/97 11:25a Lawrance
41 * added grid_read_camera_controls()
43 * 2 6/12/97 9:58a Lawrance
44 * holds grid specific types and #defines
46 * 1 6/12/97 9:51a Lawrance
52 #ifndef __MISSIONGRID_H__
53 #define __MISSIONGRID_H__
55 #define MAX_GRIDLINE_POINTS 201
56 #define L_MAX_LINES 128
64 float planeD; // D component of plane equation (A, B, C are uvec in gmatrix)
65 vector gpoints1[MAX_GRIDLINE_POINTS]; // 1 -4 are edge gridpoints for small grid.
66 vector gpoints2[MAX_GRIDLINE_POINTS];
67 vector gpoints3[MAX_GRIDLINE_POINTS];
68 vector gpoints4[MAX_GRIDLINE_POINTS];
69 vector gpoints5[MAX_GRIDLINE_POINTS]; // 5-8 are edge gridpoints for large grid.
70 vector gpoints6[MAX_GRIDLINE_POINTS];
71 vector gpoints7[MAX_GRIDLINE_POINTS];
72 vector gpoints8[MAX_GRIDLINE_POINTS];
75 typedef struct tline {
76 int istart, iend, color;
79 extern grid Global_grid;
80 extern grid *The_grid;
81 extern int double_fine_gridlines;
83 void grid_read_camera_controls( control_info * ci, float frametime );
84 void maybe_create_new_grid(grid *gridp, vector *pos, matrix *orient, int force = 0);
85 grid *create_grid(grid *gridp, vector *forward, vector *right, vector *center, int nrows, int ncols, float square_size);
86 grid *create_default_grid(void);
87 void render_grid(grid *gridp);
88 void modify_grid(grid *gridp);
89 void rpd_line(vector *v0, vector *v1);
90 void grid_render_elevation_line(vector *pos, grid* gridp);