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

Function xQuickCullForSphere

src/SB/Core/x/xQuickCull.cpp:140–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void xQuickCullForSphere(xQCControl* ctrl, xQCData* q, const xSphere* s)
141{
142 xVec3 v1;
143 xVec3 v2;
144 F32 radius_adjusted = 0.05f + s->r;
145
146 v1.x = -radius_adjusted, v1.y = -radius_adjusted, v1.z = -radius_adjusted;
147 v2.x = radius_adjusted, v2.y = radius_adjusted, v2.z = radius_adjusted;
148
149 v1.x += s->center.x, v1.y += s->center.y, v1.z += s->center.z;
150 v2.x += s->center.x, v2.y += s->center.y, v2.z += s->center.z;
151
152 xQCData a;
153 xQuickCullCellForVec(ctrl, &a, &v1);
154
155 xQCData b;
156 xQuickCullCellForVec(ctrl, &b, &v2);
157
158 xQuickCullCellMerge(q, &a, &b);
159}
160
161void xQuickCullForBox(xQCControl* ctrl, xQCData* q, const xBox* box)
162{

Callers 1

xQuickCullForBoundFunction · 0.70

Calls 2

xQuickCullCellForVecFunction · 0.85
xQuickCullCellMergeFunction · 0.85

Tested by

no test coverage detected