AGX Dynamics  2.37.3.2
SphereBoxOverlapTest.h File Reference
#include <agx/Vec3.h>
#include <agx/AffineMatrix4x4.h>

Go to the source code of this file.

Namespaces

 agx
 The agx namespace contains the dynamics/math part of the AGX Dynamics API.
 

Macros

#define AXIS_TEST(axis)
 

Functions

bool agx::sphereBoxOverlapTest (Real sphereRadius, const Vec3 &spherePosition, const Vec3 &boxHalfExtents, const AffineMatrix4x4 &boxInvTransform)
 

Macro Definition Documentation

◆ AXIS_TEST

#define AXIS_TEST (   axis)
Value:
{ \
Real diff = std::abs( localSpherePosition[axis] ) - boxHalfExtents[axis]; \
if (diff > 0) { \
if (diff > sphereRadius) \
return false; /* Early out */ \
isOutside = true; \
pointOnBox[axis] = (localSpherePosition[axis] > 0) ? boxHalfExtents[axis] : -boxHalfExtents[axis]; \
} \
}

Definition at line 26 of file SphereBoxOverlapTest.h.

Referenced by agx::sphereBoxOverlapTest().