changes in the code structure

git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@432 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
chappuis.daniel 2011-07-10 17:31:19 +00:00
parent 5b30979de9
commit a04db140bf
16 changed files with 13 additions and 13 deletions

View File

@ -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 <cassert>
#include <complex>

View File

@ -26,7 +26,7 @@
#define CONTACT_INFO_H
// Libraries
#include "../body/OBB.h"
#include "../body/BoxShape.h"
#include "../mathematics/mathematics.h"
// ReactPhysics3D namespace

View File

@ -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<const RigidBody*>(body1);
const RigidBody* rigidBody2 = dynamic_cast<const RigidBody*>(body2);
const OBB* obb1 = dynamic_cast<const OBB*>(rigidBody1->getShape());
const OBB* obb2 = dynamic_cast<const OBB*>(rigidBody2->getShape());
const BoxShape* obb1 = dynamic_cast<const BoxShape*>(rigidBody1->getShape());
const BoxShape* obb2 = dynamic_cast<const BoxShape*>(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

View File

@ -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

View File

@ -26,7 +26,7 @@
#define CONTACT_CACHING_INFO_H
// Libraries
#include "../body/OBB.h"
#include "../body/BoxShape.h"
// ReactPhysics3D namespace
namespace reactphysics3d {

View File

@ -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