BIH_SPLITX = 0,
BIH_SPLITY = 1,
BIH_SPLITZ = 2,
- BIH_LEAF = 3,
}
bih_nodetype_t;
+typedef enum bih_leaftype_e
+{
+ BIH_BRUSH = 3,
+ BIH_COLLISIONTRIANGLE = 4,
+ BIH_RENDERTRIANGLE = 5,
+}
+bih_leaftype_t;
+
typedef struct bih_node_s
{
bih_nodetype_t type; // = BIH_SPLITX and similar values
typedef struct bih_leaf_s
{
- bih_nodetype_t type; // = BIH_LEAF
+ bih_leaftype_t type; // = BIH_BRUSH And similar values
float mins[3];
float maxs[3];
// data past this point is generic and entirely up to the caller...
int textureindex;
+ int surfaceindex;
int itemindex; // triangle or brush index
}
bih_leaf_t;
int BIH_Build(bih_t *bih, int numleafs, bih_leaf_t *leafs, int maxnodes, bih_node_t *nodes, int *temp_leafsort, int *temp_leafsortscratch);
+int BIH_GetTriangleListForBox(const bih_t *bih, int maxtriangles, int *trianglelist_idx, int *trianglelist_surf, const float *mins, const float *maxs);
+
#endif