public void updateCollisionPairs(double timeStep) {
		clearCollisionPairs();

		for (int i = 0; i < rigidBodies.size(); i++) {
			RigidBody rigidBody = rigidBodies.get(i);
			Vector3d predictedPosition = new Vector3d();
			Quat4d predictedRotation = new Quat4d();
			rigidBody.predictCollisionPosition(timeStep, predictedPosition,
					predictedRotation);
			Matrix3d rotationMatrix = new Matrix3d();
			rotationMatrix.set(predictedRotation);
			rigidBody.getCollisionObject().updateBounds(predictedPosition,
					rotationMatrix);
		}

		// TODO Horrible O(n^2). Use spatial hashing instead
		for (int i = 0; i < rigidBodies.size(); i++) {
			RigidBody rigidBody = rigidBodies.get(i);
			for (int j = i + 1; j < rigidBodies.size(); j++) {
				RigidBody rigidBody2 = rigidBodies.get(j);
				if (rigidBody.getCollisionObject().intersectsBounds(
						rigidBody2.getCollisionObject())) {
					collisionPairs
							.add(new CollisionPair(rigidBody, rigidBody2));
				}
			}
		}
	}