mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-17 12:00:26 +02:00
50 lines
846 B
C
50 lines
846 B
C
/*
|
|
BSP2D.H
|
|
|
|
header included in hcex build.
|
|
*/
|
|
|
|
#ifndef __BSP2D_H
|
|
#define __BSP2D_H
|
|
#pragma once
|
|
|
|
/* ---------- headers */
|
|
|
|
#include "math/real_math.h"
|
|
#include "tag_files/tag_groups.h"
|
|
|
|
/* ---------- constants */
|
|
|
|
enum
|
|
{
|
|
/* port: how many nodes deep a walk of a bsp2d (from the map) goes
|
|
before it stops (the engine has no limit): far above the retail bsps,
|
|
which are at most 8 deep. A cycle of nodes would never end */
|
|
MAXIMUM_BSP2D_TRAVERSAL_DEPTH = 128,
|
|
};
|
|
|
|
/* ---------- macros */
|
|
|
|
/* ---------- structures */
|
|
|
|
struct bsp2d_node
|
|
{
|
|
real_plane2d plane;
|
|
long child_indices[2];
|
|
};
|
|
|
|
struct bsp2d
|
|
{
|
|
struct tag_block nodes;
|
|
};
|
|
|
|
/* ---------- prototypes/EXAMPLE.C */
|
|
|
|
/* ---------- globals */
|
|
|
|
/* ---------- public code */
|
|
|
|
long bsp2d_test_point(struct tag_block const *nodes, real_point2d const *point, long node_index);
|
|
|
|
#endif // __BSP2D_H
|