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

Function xBoundUpdate

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

Source from the content-addressed store, hash-verified

7#include "iMath.h"
8
9void xBoundUpdate(xBound* b)
10{
11 if (b->type == XBOUND_TYPE_BOX)
12 {
13 xVec3Add(&b->box.center, &b->box.box.lower, &b->box.box.upper);
14 xVec3SMul(&b->box.center, &b->box.center, 0.5f);
15 }
16 else if (b->type == XBOUND_TYPE_OBB)
17 {
18 xVec3Add(&b->box.center, &b->box.box.lower, &b->box.box.upper);
19 xVec3SMul(&b->box.center, &b->box.center, 0.5f);
20 xMat4x3Toworld(&b->box.center, b->mat, &b->box.center);
21 }
22
23 if (b->type != XBOUND_TYPE_NA)
24 {
25 xQuickCullForBound(&b->qcd, b);
26 }
27}
28
29void xBoundGetBox(xBox& box, const xBound& bound)
30{

Callers 4

SB1Dummy_BoundFuncFunction · 0.85
xEntBoulder_RealBUpdateFunction · 0.85
xEntDefaultBoundUpdateFunction · 0.85
xEntRepositionFunction · 0.85

Calls 4

xVec3AddFunction · 0.85
xVec3SMulFunction · 0.85
xMat4x3ToworldFunction · 0.85
xQuickCullForBoundFunction · 0.70

Tested by

no test coverage detected