1#ifndef COASTLINE_VISGRID_H
2#define COASTLINE_VISGRID_H
17#define VISIBLE_GRID_SIZE 64
20#define FRUSTUM_POINTS 6
21#define FRUSTUM_CAMERA 0
22#define FRUSTUM_RIGHT_TOP 1
23#define FRUSTUM_LEFT_TOP 2
24#define FRUSTUM_LEFT_BOTTOM 3
25#define FRUSTUM_RIGHT_BOTTOM 4
A point or direction in space.
Definition vecmath.h:17
The integer and floating-point types of the console, for headers shared with Windows.
float f32
Definition ultratypes.h:38
int s32
Definition ultratypes.h:25
The vector and matrix arithmetic of the game, its arctangent and power, the triangle and segment test...
s32 g_dwVisibleGridMaxCol
The last column of the cells covered by the view frustum.
s32 g_adwVisibleGridColMinRow[VISIBLE_GRID_SIZE]
The first covered row of each column.
#define VISIBLE_GRID_SIZE
The cells along each side of the grid.
Definition visgrid.h:17
s32 IsPointVisible(f32 x, f32 y)
Whether the cell under a point of the track is covered.
void MarkVisibleEdge(f32 x0, f32 y0, f32 x1, f32 y1)
Mark the cells a line between two points of the track passes through.
s32 g_dwVisibleGridMinCol
The bounds of the covered cells.
void BuildVisibleGrid(void)
Build the grid from the edges of the view frustum.
s32 g_adwVisibleGridRowMaxCol[VISIBLE_GRID_SIZE]
The last covered column of each row.
s32 g_dwVisibleGridMinRow
The first row of the cells covered by the view frustum.
s32 g_adwVisibleGridRowMinCol[VISIBLE_GRID_SIZE]
The first covered column of each row.
void MarkVisibleCell(s32 col, s32 row)
Widen the covered columns of a row to take in a cell, clamped to the grid.
Vec3f g_avFrustumPoints[FRUSTUM_POINTS]
The camera and five far-plane points of the view frustum.
s32 g_adwVisibleGridColMaxRow[VISIBLE_GRID_SIZE]
The last covered row of each column.
#define FRUSTUM_POINTS
Definition visgrid.h:20
s32 IsCellVisible(s32 col, s32 row)
Whether a cell is covered.
s32 g_dwVisibleGridMaxRow
The last row of the cells covered by the view frustum.