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

Function BoundingSphereIsSphereInside

trinity/Utilities/BoundingSphere.cpp:22–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22bool BoundingSphereIsSphereInside( const Vector4& parentSphere, const Vector4& testSphere )
23{
24 // pre-chck radiuses
25 if( parentSphere.w < testSphere.w )
26 {
27 return false;
28 }
29 Vector3 delta = (const Vector3&)testSphere - (const Vector3&)parentSphere;
30 return ( LengthSq( delta ) <= ( parentSphere.w - testSphere.w ) * ( parentSphere.w - testSphere.w ) );
31}
32
33void BoundingSphereUpdate( const Vector3& pos, Vector4& sphere )
34{

Callers 1

BoundingSphereUpdateFunction · 0.85

Calls 1

LengthSqFunction · 0.85

Tested by

no test coverage detected