| 68 | } |
| 69 | |
| 70 | void BoundingSphereTransform( const Matrix& tf, Vector4& sphere ) |
| 71 | { |
| 72 | Vector3 center; |
| 73 | // translate center |
| 74 | sphere.GetXYZ() = TransformCoord( sphere.GetXYZ(), tf ); |
| 75 | // scale with highest scale factor |
| 76 | float scaleX = Length( tf.GetX() ); |
| 77 | float scaleY = Length( tf.GetY() ); |
| 78 | float scaleZ = Length( tf.GetZ() ); |
| 79 | float scale = std::max( scaleX, std::max( scaleY, scaleZ ) ); |
| 80 | sphere.w *= scale; |
| 81 | } |
| 82 | |
| 83 | void BoundingSphereTranslate( const Vector3& offset, Vector4& sphere ) |
| 84 | { |
no test coverage detected