diff --git a/src/collision/CollisionDetection.cpp b/src/collision/CollisionDetection.cpp index 8aee85cf..930c681d 100644 --- a/src/collision/CollisionDetection.cpp +++ b/src/collision/CollisionDetection.cpp @@ -28,7 +28,7 @@ #include "GJK/GJKAlgorithm.h" #include "SATAlgorithm.h" #include "../body/Body.h" -#include "../body/OBB.h" +#include "../body/BoxShape.h" #include "../body/RigidBody.h" #include #include diff --git a/src/collision/ContactInfo.h b/src/collision/ContactInfo.h index f0b7c1cf..20ea156f 100644 --- a/src/collision/ContactInfo.h +++ b/src/collision/ContactInfo.h @@ -26,7 +26,7 @@ #define CONTACT_INFO_H // Libraries -#include "../body/OBB.h" +#include "../body/BoxShape.h" #include "../mathematics/mathematics.h" // ReactPhysics3D namespace diff --git a/src/collision/SATAlgorithm.cpp b/src/collision/SATAlgorithm.cpp index a56473ed..0bb1971e 100644 --- a/src/collision/SATAlgorithm.cpp +++ b/src/collision/SATAlgorithm.cpp @@ -24,7 +24,7 @@ // Libraries #include "SATAlgorithm.h" -#include "../body/OBB.h" +#include "../body/BoxShape.h" #include "../body/RigidBody.h" #include "../constraint/Contact.h" #include "../mathematics/Transform.h" @@ -60,8 +60,8 @@ bool SATAlgorithm::testCollision(const Body* body1, const Body* body2, ContactIn const Transform& transform2 = body2->getTransform(); const RigidBody* rigidBody1 = dynamic_cast(body1); const RigidBody* rigidBody2 = dynamic_cast(body2); - const OBB* obb1 = dynamic_cast(rigidBody1->getShape()); - const OBB* obb2 = dynamic_cast(rigidBody2->getShape()); + const BoxShape* obb1 = dynamic_cast(rigidBody1->getShape()); + const BoxShape* obb2 = dynamic_cast(rigidBody2->getShape()); // If the two bounding volumes are OBB if (obb1 && obb2) { @@ -81,8 +81,8 @@ bool SATAlgorithm::testCollision(const Body* body1, const Body* body2, ContactIn // OBB are the six face normals (3 for each OBB) and the nine vectors V = Ai x Bj where Ai is the ith face normal // vector of OBB 1 and Bj is the jth face normal vector of OBB 2. We will use the notation Ai for the ith face // normal of OBB 1 and Bj for the jth face normal of OBB 2. -bool SATAlgorithm::computeCollisionTest(const OBB* obb1, const Transform& transform1, - const OBB* obb2, const Transform& transform2, ContactInfo*& contactInfo) const { +bool SATAlgorithm::computeCollisionTest(const BoxShape* obb1, const Transform& transform1, + const BoxShape* obb2, const Transform& transform2, ContactInfo*& contactInfo) const { double center; // Center of a projection interval diff --git a/src/collision/SATAlgorithm.h b/src/collision/SATAlgorithm.h index 3804d830..ea9249e2 100644 --- a/src/collision/SATAlgorithm.h +++ b/src/collision/SATAlgorithm.h @@ -28,7 +28,7 @@ // Libraries #include "NarrowPhaseAlgorithm.h" #include "../constraint/Contact.h" -#include "../body/OBB.h" +#include "../body/BoxShape.h" #include "../mathematics/Transform.h" // ReactPhysics3D namespace @@ -50,8 +50,8 @@ namespace reactphysics3d { */ class SATAlgorithm : public NarrowPhaseAlgorithm { private : - bool computeCollisionTest(const OBB* obb1, const Transform& transform1, - const OBB* obb2, const Transform& transform2, + bool computeCollisionTest(const BoxShape* obb1, const Transform& transform1, + const BoxShape* obb2, const Transform& transform2, ContactInfo*& contactInfo) const; // Return true and compute a contact info if the two OBB collide double computePenetrationDepth(double min1, double max1, double min2, double max2) const; // Compute the penetration depth of two projection intervals Vector3D computeContactNormal(const Vector3D& axis, const Vector3D& distanceOfOBBs) const; // Compute a contact normal diff --git a/src/engine/ContactCachingInfo.h b/src/engine/ContactCachingInfo.h index 07b75bcc..52af8365 100644 --- a/src/engine/ContactCachingInfo.h +++ b/src/engine/ContactCachingInfo.h @@ -26,7 +26,7 @@ #define CONTACT_CACHING_INFO_H // Libraries -#include "../body/OBB.h" +#include "../body/BoxShape.h" // ReactPhysics3D namespace namespace reactphysics3d { diff --git a/src/reactphysics3d.h b/src/reactphysics3d.h index 60af0a51..2982dc73 100644 --- a/src/reactphysics3d.h +++ b/src/reactphysics3d.h @@ -39,8 +39,8 @@ #include "engine/PhysicsWorld.h" #include "engine/PhysicsEngine.h" #include "body/Shape.h" -#include "body/OBB.h" -#include "body/BoundingSphere.h" +#include "body/BoxShape.h" +#include "body/SphereShape.h" #include "body/AABB.h" // Alias to the ReactPhysics3D namespace diff --git a/src/body/AABB.cpp b/src/shapes/AABB.cpp similarity index 100% rename from src/body/AABB.cpp rename to src/shapes/AABB.cpp diff --git a/src/body/AABB.h b/src/shapes/AABB.h similarity index 100% rename from src/body/AABB.h rename to src/shapes/AABB.h diff --git a/src/body/BoxShape.cpp b/src/shapes/BoxShape.cpp similarity index 100% rename from src/body/BoxShape.cpp rename to src/shapes/BoxShape.cpp diff --git a/src/body/BoxShape.h b/src/shapes/BoxShape.h similarity index 100% rename from src/body/BoxShape.h rename to src/shapes/BoxShape.h diff --git a/src/body/ConeShape.cpp b/src/shapes/ConeShape.cpp similarity index 100% rename from src/body/ConeShape.cpp rename to src/shapes/ConeShape.cpp diff --git a/src/body/ConeShape.h b/src/shapes/ConeShape.h similarity index 100% rename from src/body/ConeShape.h rename to src/shapes/ConeShape.h diff --git a/src/body/Shape.cpp b/src/shapes/Shape.cpp similarity index 100% rename from src/body/Shape.cpp rename to src/shapes/Shape.cpp diff --git a/src/body/Shape.h b/src/shapes/Shape.h similarity index 100% rename from src/body/Shape.h rename to src/shapes/Shape.h diff --git a/src/body/SphereShape.cpp b/src/shapes/SphereShape.cpp similarity index 100% rename from src/body/SphereShape.cpp rename to src/shapes/SphereShape.cpp diff --git a/src/body/SphereShape.h b/src/shapes/SphereShape.h similarity index 100% rename from src/body/SphereShape.h rename to src/shapes/SphereShape.h