Extract bounding sphere in local space.
| 42 | { |
| 43 | // Extract bounding sphere in local space. |
| 44 | static Sphere local_sphere(const RenderWorld::LightManager &lm, u32 i) |
| 45 | { |
| 46 | Sphere s; |
| 47 | |
| 48 | if (lm._data.type[i] == LightType::OMNI) { |
| 49 | s = { VECTOR3_ZERO, lm._data.shader[i].range }; |
| 50 | } else if (lm._data.type[i] == LightType::SPOT) { |
| 51 | s = sphere::from_cone(VECTOR3_ZERO |
| 52 | , VECTOR3_DOWN |
| 53 | , lm._data.shader[i].range |
| 54 | , lm._data.shader[i].spot_angle |
| 55 | ); |
| 56 | } else { |
| 57 | CE_FATAL("Unknown light type"); |
| 58 | } |
| 59 | |
| 60 | return s; |
| 61 | } |
| 62 | |
| 63 | static Sphere obb_sphere(const OBB &obb) |
| 64 | { |
no test coverage detected