It make sense to generate the bounds JIT when you are actually building an octree to test collisions. Assuming you have a nontrivial amount of objects.
That being said, a lot of tricks work better with center/extent instead of min/max, such as computing the AABB around an OBB or doing separating axis tests with abs() tricks. A bounding box and bounding sphere can also be stored together as center/extent/radius with only one additional value needed. Min/max works better for accumulation, though.
throwaway2027•3w ago
Why not just do struct aabb { float mins[3]; float maxs[3]; };
pkaler•3w ago
I'm guessing here. I haven't written video games in 20 years but struct packing/alignment was super important on the Sony PSP back then.
shihab•3w ago
new_box.mins = _mm_min_ps(a.mins[3], b.mins[3]);
delta_p_delta_x•3w ago
astrange•3w ago
nice_byte•3w ago