| 27 | } |
| 28 | |
| 29 | void 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 | |
| 57 | void xBoundGetSphere(xSphere& o, const xBound& bound) |
| 58 | { |
no test coverage detected