30 #include "../shared/typedefs.h"
36 #if defined(COMPILE_MAP)
37 #define TR_TILE_TYPE dMapTile_t
38 #define TR_PLANE_TYPE dBspPlane_t
39 #elif defined(COMPILE_UFO)
40 #define TR_TILE_TYPE MapTile
41 #define TR_PLANE_TYPE cBspPlane_t
43 #error Either COMPILE_MAP or COMPILE_UFO must be defined in order for tracing.c to work.
50 #define TRACE_VISIBLE_LEVELS 0x0FF
51 #define TRACE_CLIP_LEVELS 0x100
52 #define TRACE_ALL_LEVELS 0x1FF
108 void init (TR_TILE_TYPE* _tile,
const int contentmask,
const int brushreject,
const float fraction);
117 trace_t TR_SingleTileBoxTrace(
mapTiles_t*
mapTiles,
const Line& traceLine,
const AABB* traceBox,
const int levelmask,
const int brushmask,
const int brushreject);
124 trace_t TR_TileBoxTrace(TR_TILE_TYPE* myTile,
const Line& traceLine,
const AABB& aabb,
const int levelmask,
const int brushmask,
const int brushreject);
void getTileOverlap(const byte tile1, const byte tile2, int &minZ, int &maxZ)
bool TR_TestLineDM(mapTiles_t *mapTiles, const vec3_t start, const vec3_t end, vec3_t hit, const int levelmask)
Checks traces against the world, gives hit position back.
void setLineAndBox(const Line &line, const AABB &box)
void TR_BuildTracingNode_r(TR_TILE_TYPE *tile, tnode_t **tnode, int32_t nodenum, int level)
Data for line tracing (?)
struct boxtrace_s boxtrace_t
struct mapTiles_s mapTiles_t
void init(TR_TILE_TYPE *_tile, const int contentmask, const int brushreject, const float fraction)
int TR_TestLine_r(TR_TILE_TYPE *tile, int32_t nodenum, const vec3_t start, const vec3_t end)
trace_t TR_BoxTrace(boxtrace_t &traceData, const Line &traceLine, const AABB &traceBox, const int headnode, const float fraction)
This function traces a line from start to end. It returns a trace_t indicating what portion of the li...
void getTilesAt(int x, int y, byte &fromTile1, byte &fromTile2, byte &fromTile3)
bool TR_TestLine(mapTiles_t *mapTiles, const vec3_t start, const vec3_t end, const int levelmask)
Checks traces against the world.
TR_TILE_TYPE mapTiles[MAX_MAPTILES]
int TR_BoxOnPlaneSide(const vec3_t mins, const vec3_t maxs, const TR_PLANE_TYPE *plane)
Returns PSIDE_FRONT, PSIDE_BACK, or PSIDE_BOTH.
trace_t TR_TileBoxTrace(TR_TILE_TYPE *myTile, const Line &traceLine, const AABB &aabb, const int levelmask, const int brushmask, const int brushreject)
Traces all submodels in the specified tile. Provides for a short circuit if the trace tries to move p...
void printTilesAt(int x, int y)
static mapTiles_t mapTiles