| 180 | } |
| 181 | |
| 182 | void BoundingSphereFromBox( Vector4& sphere, const Vector3& minBounds, const Vector3& maxBounds, const Matrix* tf ) |
| 183 | { |
| 184 | Vector3 min( minBounds ); |
| 185 | Vector3 max( maxBounds ); |
| 186 | |
| 187 | if( tf ) |
| 188 | { |
| 189 | min = TransformCoord( minBounds, *tf ); |
| 190 | max = TransformCoord( maxBounds, *tf ); |
| 191 | } |
| 192 | |
| 193 | sphere.GetXYZ() = min + max; |
| 194 | min -= max; |
| 195 | sphere.w = Length( min ); |
| 196 | sphere *= 0.5f; |
| 197 | } |
| 198 | |
| 199 | // -------------------------------------------------------------------------------- |
| 200 | // Description: |
no test coverage detected