FTEQW
Documentation of the FTE engine source tree.
com_bih.h
Go to the documentation of this file.
1#if 1
2 #define BIH_USEBIH
3#else
4 #define BIH_USEBVH
5#endif
6
7typedef struct q2mapsurface_s // used internally due to name len probs //ZOID
8{
10 char rname[32];
12typedef struct
13{
17typedef struct q2cbrush_s
18{
19 int checkcount; // to avoid repeated testings
26typedef struct
27{
29
30 vecV_t *xyz_array;
31 size_t numverts;
34
36 int checkcount; // to avoid repeated testings
37} q3cmesh_t;
38typedef struct
39{
41
45 int checkcount; // to avoid repeated testings
47
48
50{
51 //node types
52#ifdef BIH_USEBIH
56#endif
57#ifdef BIH_USEBVH
61#endif
63
64
65 //leaf types
66#if defined(Q2BSPS) || defined(Q3BSPS)
68#endif
69#ifdef Q3BSPS
72#endif
75};
77{
78 unsigned int contents;
79 union {
80#if defined(Q2BSPS) || defined(Q3BSPS)
82#endif
83#ifdef Q3BSPS
86#endif
87 struct {
88// vec3_t norm;
89 index_t *indexes; //might be better to just bake 3 indexes instead of using a pointer to them
90 vecV_t *xyz;
91 } tri;
92 struct {
94 struct bihtransform_s
95 {
98 } *tr;
100 };
101};
103{
108};
109
110struct galiasinfo_s;
111
112//generates a BIH tree and updates mod->funcs.NativeTrace|NativeContents funcs
113void BIH_Build (model_t *mod, struct bihleaf_s *items, size_t numitems);
114void BIH_BuildAlias (model_t *mod, struct galiasinfo_s *meshes);
vec_t vec3_t[3]
Definition: api_menu.h:40
void BIH_Build(model_t *mod, struct bihleaf_s *items, size_t numitems)
Definition: com_bih.c:1808
struct q2cbrush_s q2cbrush_t
void BIH_BuildAlias(model_t *mod, struct galiasinfo_s *meshes)
Definition: com_bih.c:1835
bihtype_e
Definition: com_bih.h:50
@ BIH_X
Definition: com_bih.h:53
@ BIH_TRIANGLE
Definition: com_bih.h:73
@ BIH_GROUP
Definition: com_bih.h:62
@ BIH_Y
Definition: com_bih.h:54
@ BVH_X
Definition: com_bih.h:58
@ BIH_TRISOUP
Definition: com_bih.h:71
@ BVH_Z
Definition: com_bih.h:60
@ BIH_Z
Definition: com_bih.h:55
@ BVH_Y
Definition: com_bih.h:59
@ BIH_BRUSH
Definition: com_bih.h:67
@ BIH_MODEL
Definition: com_bih.h:74
@ BIH_PATCHBRUSH
Definition: com_bih.h:70
struct q2mapsurface_s q2mapsurface_t
mesh_t ** meshes
Definition: gl_backend.c:140
vec3_t absmins
Definition: r_d3.c:693
unsigned short index_t
Definition: render.h:56
Definition: com_bih.h:77
vec3_t axis[3]
Definition: com_bih.h:96
struct bihdata_s::@154::@156 tri
struct bihdata_s::@154::@157::bihtransform_s * tr
q3cmesh_t * cmesh
Definition: com_bih.h:85
unsigned int contents
Definition: com_bih.h:78
struct bihdata_s::@154::@157 mesh
model_t * model
Definition: com_bih.h:93
vec3_t origin
Definition: com_bih.h:97
index_t * indexes
Definition: com_bih.h:89
vecV_t * xyz
Definition: com_bih.h:90
q2cbrush_t * patchbrush
Definition: com_bih.h:84
q2cbrush_t * brush
Definition: com_bih.h:81
Definition: com_bih.h:103
struct bihdata_s data
Definition: com_bih.h:107
vec3_t mins
Definition: com_bih.h:105
vec3_t maxs
Definition: com_bih.h:106
enum bihtype_e type
Definition: com_bih.h:104
Definition: world.h:31
Definition: com_mesh.h:141
Definition: gl_model.h:972
Definition: render.h:193
Definition: com_bih.h:18
int checkcount
Definition: com_bih.h:19
int numsides
Definition: com_bih.h:23
int contents
Definition: com_bih.h:20
vec3_t absmins
Definition: com_bih.h:21
q2cbrushside_t * brushside
Definition: com_bih.h:24
vec3_t absmaxs
Definition: com_bih.h:22
Definition: com_bih.h:13
mplane_t * plane
Definition: com_bih.h:14
q2mapsurface_t * surface
Definition: com_bih.h:15
Definition: com_bih.h:8
char rname[32]
Definition: com_bih.h:10
q2csurface_t c
Definition: com_bih.h:9
Definition: com_bih.h:27
vecV_t * xyz_array
Definition: com_bih.h:30
int checkcount
Definition: com_bih.h:36
size_t numverts
Definition: com_bih.h:31
index_t * indicies
Definition: com_bih.h:32
q2mapsurface_t * surface
Definition: com_bih.h:35
vec3_t absmaxs
Definition: com_bih.h:28
size_t numincidies
Definition: com_bih.h:33
Definition: com_bih.h:39
vec3_t absmaxs
Definition: com_bih.h:40
q2cbrush_t * facets
Definition: com_bih.h:43
int numfacets
Definition: com_bih.h:42
int checkcount
Definition: com_bih.h:45
q2mapsurface_t * surface
Definition: com_bih.h:44