git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@169 92aac97c-a6ce-11dd-a772-7fcde58d38e6

This commit is contained in:
chappuis.daniel 2009-07-08 14:53:39 +00:00
parent 175f0ea937
commit b69886fdb3
3 changed files with 15 additions and 8 deletions

View File

@ -26,13 +26,18 @@
// Namespace ReactPhysics3D // Namespace ReactPhysics3D
namespace reactphysics3d { namespace reactphysics3d {
/* ------------------------------------------------------------------- /* --------------------------------------------------------------------
Class BroadPhaseAlgorithm : Class BroadPhaseAlgorithm :
This class is an abstract class that represents an algorithm This class is an abstract class that represents an algorithm
used to perform the broad phase of a collision detection. The used to perform the broad-phase of a collision detection. The
goal of the broad phase algorithm is to compute the bodies that goal of the broad-phase algorithm is to compute the bodies that
can collide. can collide. But it's important to understand that the
------------------------------------------------------------------- broad-phase doesn't compute only body pairs that can collide but
also pairs of body that doesn't collide but are very close. The
goal of the broad-phase is to remove pairs of body that cannot
collide in order to avoid to much bodies to be tested in the
narrow-phase.
--------------------------------------------------------------------
*/ */
class BroadPhaseAlgorithm { class BroadPhaseAlgorithm {
private : private :
@ -40,6 +45,7 @@ class BroadPhaseAlgorithm {
public : public :
BroadPhaseAlgorithm(); // Constructor BroadPhaseAlgorithm(); // Constructor
virtual ~BroadPhaseAlgorithm(); // Destructor virtual ~BroadPhaseAlgorithm(); // Destructor
virtual bool testCollisionPair(const BoundingVolume& boundingVolume1, const BoundingVolume& boundingVolume2)=0; // Return true is the two bounding volume can collide virtual bool testCollisionPair(const BoundingVolume& boundingVolume1, const BoundingVolume& boundingVolume2)=0; // Return true is the two bounding volume can collide
}; };

View File

@ -33,7 +33,8 @@ SeparatingAxis::~SeparatingAxis() {
} }
// Return true and compute a collision contact if the two bounding volume collide // Return true and compute a collision contact if the two bounding volume collide.
// The method returns false if there is no collision between the two bounding volumes.
bool SeparatingAxis::testCollision(const BoundingVolume& boundingVolume1, const BoundingVolume& boundingVolume2, Contact* const contact) { bool SeparatingAxis::testCollision(const BoundingVolume& boundingVolume1, const BoundingVolume& boundingVolume2, Contact* const contact) {
// TODO : Implement this method
} }

View File

@ -22,7 +22,7 @@
// Libraries // Libraries
#include "NarrowPhaseAlgorithm.h" #include "NarrowPhaseAlgorithm.h"
#include "../Constraint/Contact.h" #include "../constraint/Contact.h"
#include "../body/OBB.h" #include "../body/OBB.h"
// ReactPhysics3D namespace // ReactPhysics3D namespace