#include <PxRaycastCCD.h>
Public Member Functions | |
RaycastCCDManager (PxScene *scene) | |
~RaycastCCDManager () | |
bool | registerRaycastCCDObject (PxRigidDynamic *actor, PxShape *shape) |
Register dynamic object for raycast CCD. | |
void | doRaycastCCD (bool doDynamicDynamicCCD) |
Perform raycast CCD. Call this after your simulate/fetchResults calls. | |
Private Attributes | |
RaycastCCDManagerInternal * | mImpl |
Raycast-CCD is a simple and potentially cheaper alternative to the SDK's built-in continuous collision detection algorithm.
This implementation has some limitations:
Also, since it is raycast-based, the solution is not perfect. In particular:
Finally, since it is using the SDK's scene queries under the hood, it only works provided the simulation shapes also have scene-query shapes associated with them. That is, if the objects in the scene only use PxShapeFlag::eSIMULATION_SHAPE (and no PxShapeFlag::eSCENE_QUERY_SHAPE), then the raycast-CCD system will not work.
RaycastCCDManager::RaycastCCDManager | ( | PxScene * | scene | ) |
RaycastCCDManager::~RaycastCCDManager | ( | ) |
void RaycastCCDManager::doRaycastCCD | ( | bool | doDynamicDynamicCCD | ) |
Perform raycast CCD. Call this after your simulate/fetchResults calls.
[in] | doDynamicDynamicCCD | True to enable dynamic-vs-dynamic CCD (more expensive, not always needed) |
bool RaycastCCDManager::registerRaycastCCDObject | ( | PxRigidDynamic * | actor, | |
PxShape * | shape | |||
) |
Register dynamic object for raycast CCD.
[in] | actor | object's actor |
[in] | shape | object's shape |
RaycastCCDManagerInternal* RaycastCCDManager::mImpl [private] |