6 int axis() const { return child
[0]>>14; }
7 int childindex(int which
) const { return child
[which
]&0x3FFF; }
8 bool isleaf(int which
) const { return (child
[1]&(1<<(14+which
)))!=0; }
27 BIH(int numtris
, tri
*tris
);
35 static bool triintersect(tri
&tri
, const vec
&o
, const vec
&ray
, float maxdist
, float &dist
, int mode
);
37 void build(vector
<BIHNode
> &buildnodes
, ushort
*indices
, int numindices
, int depth
= 1);
39 bool traverse(const vec
&o
, const vec
&ray
, float maxdist
, float &dist
, int mode
);
40 bool collide(const vec
&o
, const vec
&radius
, const vec
&ray
, float cutoff
, vec
&normal
);
43 extern bool mmintersect(const extentity
&e
, const vec
&o
, const vec
&ray
, float maxdist
, int mode
, float &dist
);