AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SphereBoxOverlapTest.h File Reference
#include <agx/Vec3.h>
#include <agx/AffineMatrix4x4.h>

Go to the source code of this file.

Namespaces

 agx
 Namespace agx 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

#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]; \
} \
}
double Real
Definition: Real.h:42

Definition at line 26 of file SphereBoxOverlapTest.h.

Referenced by agx::sphereBoxOverlapTest().