From d6d607dda0b1a5c3d168a08948818bec734f2a1b Mon Sep 17 00:00:00 2001 From: Saeun Acreat Date: Mon, 16 Jan 2023 21:55:00 +1300 Subject: [PATCH] rename NarrowPhaseAlgorithmType::None to NONE --- .../reactphysics3d/collision/narrowphase/CollisionDispatch.h | 2 +- .../reactphysics3d/collision/narrowphase/NarrowPhaseInput.h | 2 +- src/collision/narrowphase/CollisionDispatch.cpp | 4 ++-- src/systems/CollisionDetectionSystem.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h b/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h index cf09f961..217d1f2c 100644 --- a/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h +++ b/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h @@ -40,7 +40,7 @@ namespace reactphysics3d { /// Enumeration for the type of narrow-phase /// collision detection algorithm enum class NarrowPhaseAlgorithmType { - None, + NONE, SphereVsSphere, SphereVsCapsule, CapsuleVsCapsule, diff --git a/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h b/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h index 4ac07eab..1dbf89c0 100644 --- a/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h +++ b/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h @@ -152,7 +152,7 @@ RP3D_FORCE_INLINE void NarrowPhaseInput::addNarrowPhaseTest(uint64 pairId, Entit case NarrowPhaseAlgorithmType::ConvexPolyhedronVsConvexPolyhedron: mConvexPolyhedronVsConvexPolyhedronBatch.addNarrowPhaseInfo(pairId, collider1, collider2, shape1, shape2, shape1Transform, shape2Transform, reportContacts, lastFrameInfo, shapeAllocator); break; - case NarrowPhaseAlgorithmType::None: + case NarrowPhaseAlgorithmType::NONE: // Must never happen assert(false); break; diff --git a/src/collision/narrowphase/CollisionDispatch.cpp b/src/collision/narrowphase/CollisionDispatch.cpp index fbdd5156..3a95d0b2 100644 --- a/src/collision/narrowphase/CollisionDispatch.cpp +++ b/src/collision/narrowphase/CollisionDispatch.cpp @@ -75,7 +75,7 @@ NarrowPhaseAlgorithmType CollisionDispatch::selectAlgorithm(int type1, int type2 CollisionShapeType shape2Type = static_cast(type2); if (type1 > type2) { - return NarrowPhaseAlgorithmType::None; + return NarrowPhaseAlgorithmType::NONE; } // Sphere vs Sphere algorithm if (shape1Type == CollisionShapeType::SPHERE && shape2Type == CollisionShapeType::SPHERE) { @@ -103,7 +103,7 @@ NarrowPhaseAlgorithmType CollisionDispatch::selectAlgorithm(int type1, int type2 return NarrowPhaseAlgorithmType::ConvexPolyhedronVsConvexPolyhedron; } - return NarrowPhaseAlgorithmType::None; + return NarrowPhaseAlgorithmType::NONE; } // Set the Sphere vs Sphere narrow-phase collision detection algorithm diff --git a/src/systems/CollisionDetectionSystem.cpp b/src/systems/CollisionDetectionSystem.cpp index 8d2f2ec5..eb5ac0f7 100644 --- a/src/systems/CollisionDetectionSystem.cpp +++ b/src/systems/CollisionDetectionSystem.cpp @@ -478,7 +478,7 @@ void CollisionDetectionSystem::computeConvexVsConcaveMiddlePhase(OverlappingPair assert(convexShape->isConvex()); assert(!concaveShape->isConvex()); - assert(overlappingPair.narrowPhaseAlgorithmType != NarrowPhaseAlgorithmType::None); + assert(overlappingPair.narrowPhaseAlgorithmType != NarrowPhaseAlgorithmType::NONE); // Compute the convex shape AABB in the local-space of the concave shape AABB aabb;