wrapping sphere around frustum
Crossbones+ - Reputation: 1410
Posted 06 May 2014 - 11:36 AM
Crossbones+ - Reputation: 3755
Posted 06 May 2014 - 11:43 AM
Yes, you will need to rebuild it every frame (or at least every time that the camera changes, which is going to be most frames probably).
Given that the bounding sphere is going to be used for quick trivial rejection, I'd recommend taking the once-per-frame cost of transforming the sphere from view space to world space, as that'll be more convenient (i.e. faster) to use when you do your many hundreds of trivial rejection tests.
Crossbones+ - Reputation: 11176
Posted 04 June 2014 - 02:42 AM
Given that for the purposes of intersection detection, a sphere is a centre point and a radius, the only sense in which you are "rebuilding" it is that you are moving the centre point each time. A sphere is four numbers, one of which would remain constant (the radius) in this particular application.
What exactly do you mean by "rebuilding" it?
Edited by Aardvajk, 04 June 2014 - 02:43 AM.