lot of casts, added prototypes, missing includes and some true errors
Do a sphere<->camera sphere and a sphere<->frustum before the box<->frustum test.