MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xBoundGetBox

Function xBoundGetBox

src/SB/Core/x/xBound.cpp:29–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void xBoundGetBox(xBox& box, const xBound& bound)
30{
31 switch (bound.type)
32 {
33 case XBOUND_TYPE_SPHERE:
34 {
35 const xSphere& o = bound.sph;
36
37 box.upper.assign(o.center.x + o.r, o.center.y + o.r, o.center.z + o.r);
38 box.lower.assign(o.center.x - o.r, o.center.y - o.r, o.center.z - o.r);
39
40 break;
41 }
42 case XBOUND_TYPE_BOX:
43 {
44 box = bound.box.box;
45
46 break;
47 }
48 case XBOUND_TYPE_OBB:
49 {
50 xBoxInitBoundOBB(&box, &bound.box.box, bound.mat);
51
52 break;
53 }
54 }
55}
56
57void xBoundGetSphere(xSphere& o, const xBound& bound)
58{

Callers 2

xGridCheckBoundFunction · 0.70
get_lower_extentFunction · 0.70

Calls 1

xBoxInitBoundOBBFunction · 0.70

Tested by

no test coverage detected