git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@343 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
92dabf7f7f
commit
57b2448111
|
@ -71,10 +71,13 @@ void CollisionDetection::computeBroadPhase() {
|
|||
// For each pair of bodies in the physics world
|
||||
for(std::vector<Body*>::const_iterator it1 = world->getBodiesBeginIterator(); it1 != world->getBodiesEndIterator(); ++it1) {
|
||||
for(std::vector<Body*>::const_iterator it2 = it1; it2 != world->getBodiesEndIterator(); ++it2) {
|
||||
// If both bodies are RigidBody and are different
|
||||
|
||||
RigidBody* rigidBody1 = dynamic_cast<RigidBody*>(*it1);
|
||||
RigidBody* rigidBody2 = dynamic_cast<RigidBody*>(*it2);
|
||||
if(rigidBody1 && rigidBody2 && rigidBody1 != rigidBody2) {
|
||||
|
||||
// If both bodies are RigidBody and are different and if both have collision activated
|
||||
if(rigidBody1 && rigidBody2 && rigidBody1 != rigidBody2
|
||||
&& rigidBody1->getIsCollisionEnabled() && rigidBody2->getIsCollisionEnabled()) {
|
||||
// Get the oriented bounding boxes of the two bodies
|
||||
const OBB* obb1 = rigidBody1->getOBB();
|
||||
const OBB* obb2 = rigidBody2->getOBB();
|
||||
|
|
Loading…
Reference in New Issue
Block a user