Open source remastering of the Freespace 2 engine
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
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 the
6  * source.
7  *
8 */
12 #ifndef __MISSIONGRID_H__
13 #define __MISSIONGRID_H__
15 #include "globalincs/pstypes.h"
16 #include "physics/physics.h"
18 #define MAX_GRIDLINE_POINTS 201
19 #define L_MAX_LINES 128
21 typedef struct grid {
22  int nrows, ncols;
26  float square_size;
27  float planeD; // D component of plane equation (A, B, C are uvec in gmatrix)
28  vec3d gpoints1[MAX_GRIDLINE_POINTS]; // 1 -4 are edge gridpoints for small grid.
32  vec3d gpoints5[MAX_GRIDLINE_POINTS]; // 5-8 are edge gridpoints for large grid.
36 } grid;
38 typedef struct tline {
39  int istart, iend, color;
40 } tline;
42 extern grid Global_grid;
43 extern grid *The_grid;
44 extern int double_fine_gridlines;
46 void grid_read_camera_controls( control_info * ci, float frametime );
47 void maybe_create_new_grid(grid *gridp, vec3d *pos, matrix *orient, int force = 0);
48 grid *create_grid(grid *gridp, vec3d *forward, vec3d *right, vec3d *center, int nrows, int ncols, float square_size);
50 void render_grid(grid *gridp);
51 void modify_grid(grid *gridp);
52 void rpd_line(vec3d *v0, vec3d *v1);
55 #endif
void maybe_create_new_grid(grid *gridp, vec3d *pos, matrix *orient, int force=0)
Definition: missiongrid.cpp:66
float square_size
Definition: missiongrid.h:26
void rpd_line(vec3d *v0, vec3d *v1)
Definition: pstypes.h:88
void grid_render_elevation_line(vec3d *pos, grid *gridp)
hull_check orient
Definition: lua.cpp:5049
struct grid grid
int nrows
Definition: missiongrid.h:22
int color
Definition: missiongrid.h:39
int ncols
Definition: missiongrid.h:22
Definition: missiongrid.h:18
grid * The_grid
Definition: missiongrid.cpp:20
struct tline tline
matrix gmatrix
Definition: missiongrid.h:24
vec3d center
Definition: missiongrid.h:23
GLfloat v0
Definition: Glext.h:5638
vec3d gpoints4[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:31
vec3d gpoints7[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:34
int iend
Definition: missiongrid.h:39
vec3d gpoints5[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:32
vec3d gpoints6[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:33
grid Global_grid
Definition: missiongrid.cpp:19
vec3d gpoints2[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:29
GLfloat GLfloat v1
Definition: Glext.h:5639
vec3d gpoints1[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:28
GLdouble GLdouble right
Definition: Glext.h:10330
void render_grid(grid *gridp)
grid * create_grid(grid *gridp, vec3d *forward, vec3d *right, vec3d *center, int nrows, int ncols, float square_size)
void modify_grid(grid *gridp)
float planeD
Definition: missiongrid.h:27
hull_check pos
Definition: lua.cpp:5050
vec3d gpoints3[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:30
vec3d gpoints8[MAX_GRIDLINE_POINTS]
Definition: missiongrid.h:35
physics_info physics
Definition: missiongrid.h:25
grid * create_default_grid(void)
void grid_read_camera_controls(control_info *ci, float frametime)
Definition: missiongrid.cpp:23
int double_fine_gridlines
Definition: missiongrid.cpp:21
int istart
Definition: missiongrid.h:39