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

Function xRayHitsBound

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

Source from the content-addressed store, hash-verified

290}
291
292void xRayHitsBound(const xRay3* r, const xBound* b, xCollis* c)
293{
294 xIsect isect;
295
296 if (b->type == XBOUND_TYPE_SPHERE)
297 {
298 iSphereIsectRay(&b->sph, r, &isect);
299 }
300 else if (b->type == XBOUND_TYPE_OBB)
301 {
302 xBoundOBBIsectRay(&b->box.box, b->mat, r, &isect);
303 }
304 else if (b->type == XBOUND_TYPE_BOX)
305 {
306 iBoxIsectRay(&b->box.box, r, &isect);
307 }
308
309 if (isect.penned <= 0.0f)
310 {
311 c->flags |= 0x1;
312 c->dist = isect.dist;
313 }
314 else
315 {
316 c->flags &= ~0x1;
317 }
318}
319
320void xSphereHitsBound(const xSphere* o, const xBound* b, xCollis* c)
321{

Callers 6

xRayHitsTikiLandableEntFunction · 0.70
xRayHitsEntFunction · 0.70
operator()Method · 0.70
collide_updateMethod · 0.70
NPCC_LineHitsBoundFunction · 0.50
zPlatform_PaddleCollideFunction · 0.50

Calls 3

xBoundOBBIsectRayFunction · 0.70
iSphereIsectRayFunction · 0.50
iBoxIsectRayFunction · 0.50

Tested by

no test coverage detected