MCPcopy Create free account
hub / github.com/carbonengine/trinity / BoundingSphereTransform

Function BoundingSphereTransform

trinity/Utilities/BoundingSphere.cpp:70–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void 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
83void BoundingSphereTranslate( const Vector3& offset, Vector4& sphere )
84{

Callers 15

UpdateVisibilityMethod · 0.85
IsCastingShadowMethod · 0.85
UpdateVisibilityMethod · 0.85
GetBoundingSphereMethod · 0.85
UpdateVisibilityMethod · 0.85
UpdateVisibilityMethod · 0.85
GetBoundingSphereMethod · 0.85
GetBoundingSphereMethod · 0.85
UpdateAsyncronousMethod · 0.85
UpdateAsyncronousMethod · 0.85
GetBoundingSphereMethod · 0.85

Calls 4

LengthFunction · 0.85
GetXMethod · 0.45
GetYMethod · 0.45
GetZMethod · 0.45

Tested by

no test coverage detected