aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp
diff options
context:
space:
mode:
authorsschirm <[email protected]>2017-02-27 16:40:12 +0100
committersschirm <[email protected]>2017-03-01 18:04:26 +0100
commit7840347c32755e94a807f978f1cbb558717ac8cf (patch)
tree295cd3ca93a45f8fcc43cf3cbf3887c0e0c5526b /PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp
parentPre-release comments marking end of beta. (diff)
downloadphysx-3.4-7840347c32755e94a807f978f1cbb558717ac8cf.tar.xz
physx-3.4-7840347c32755e94a807f978f1cbb558717ac8cf.zip
PhysX 3.4, APEX 1.4 final release @21757769v3.4.0-rc-2
Diffstat (limited to 'PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp')
-rw-r--r--PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp b/PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp
index 97fdaa0a..0ca62673 100644
--- a/PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp
+++ b/PhysX_3.4/Source/PhysX/src/NpBatchQuery.cpp
@@ -36,6 +36,7 @@
#include "PsFoundation.h"
#include "PsUtilities.h"
#include "NpScene.h"
+#include "PxGeometryQuery.h"
using namespace physx;
using namespace Sq;
@@ -523,6 +524,14 @@ void NpBatchQuery::sweep(
PX_CHECK_AND_RETURN(distance != 0.0f || !(hitFlags & PxHitFlag::eASSUME_NO_INITIAL_OVERLAP),
"Batch sweep input check: zero-length sweep only valid without the PxHitFlag::eASSUME_NO_INITIAL_OVERLAP flag");
+#if PX_CHECKED
+ if(!PxGeometryQuery::isValid(geometry))
+ {
+ Ps::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "Provided geometry is not valid");
+ return;
+ }
+#endif // PX_CHECKED
+
if (mNbSweeps >= mDesc.queryMemory.getMaxSweepsPerExecute())
{
PX_CHECK_AND_RETURN(mNbSweeps < mDesc.queryMemory.getMaxSweepsPerExecute(),