-------------------------------------------------------------------------------- Description: Create a bounding sphere by two given points --------------------------------------------------------------------------------
| 262 | // Create a bounding sphere by two given points |
| 263 | // -------------------------------------------------------------------------------- |
| 264 | void BoundingSphereFromPoints( Vector4& sphere, const Vector3& point1, const Vector3& point2 ) |
| 265 | { |
| 266 | const float radiusEpsilon = 1e-4f; |
| 267 | |
| 268 | Vector3 a = 0.5f * ( point2 - point1 ); |
| 269 | sphere = Vector4( a + point1, Length( a ) + radiusEpsilon ); |
| 270 | } |
| 271 | |
| 272 | // -------------------------------------------------------------------------------- |
| 273 | // Description: |
no test coverage detected