MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _Collide

Method _Collide

Engine/lib/opcode/OPC_SphereCollider.cpp:342–361  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// * Recursive collision query for normal AABB trees. * \param node [in] current collision node */ //////////////////////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

340 */
341///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
342void SphereCollider::_Collide(const AABBCollisionNode* node)
343{
344 // Perform Sphere-AABB overlap test
345 if(!SphereAABBOverlap(node->mAABB.mCenter, node->mAABB.mExtents)) return;
346
347 TEST_BOX_IN_SPHERE(node->mAABB.mCenter, node->mAABB.mExtents)
348
349 if(node->IsLeaf())
350 {
351 SPHERE_PRIM(node->GetPrimitive(), OPC_CONTACT)
352 }
353 else
354 {
355 _Collide(node->GetPos());
356
357 if(ContactFound()) return;
358
359 _Collide(node->GetNeg());
360 }
361}
362
363///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
364/**

Callers

nothing calls this directly

Calls 2

ContactFoundFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected