git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@233 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
902f3ab2b4
commit
325c80dd49
|
@ -36,6 +36,8 @@
|
|||
// We want to use the ReactPhysics3D namespace
|
||||
using namespace reactphysics3d;
|
||||
|
||||
// TODO : Remove all the std::cout
|
||||
|
||||
// TODO : Check and modify all comments on this file in order that
|
||||
// everything have to do with the new SAT algorithm
|
||||
|
||||
|
@ -279,10 +281,10 @@ bool NarrowPhaseSATAlgorithm::computeCollisionTest(const OBB* const obb1, const
|
|||
//std::cout << "Current -- 1 -- MIN Points : " << currentInterval1.getMinProjectedPoints().size() << " MAX : " << currentInterval1.getMaxProjectedPoints().size() << std::endl;
|
||||
//std::cout << "Current -- 1 -- min : " << currentInterval1.getMin() << std::endl;
|
||||
//std::cout << "Timefirst : " << timeFirst.getValue() << std::endl;
|
||||
std::cout << "CONTACT FOUND AND TIMEFIRST IS " << timeFirst.getValue() << std::endl;
|
||||
std::cout << "CONTACT FOUND " << std::endl;
|
||||
|
||||
// TODO : The normal has to be unit before passing it to the computeContact() method
|
||||
computeContact(currentInterval1, currentInterval2, velocity1, velocity2, timeFirst, side, contact);
|
||||
// Compute the collision contact
|
||||
computeContact(obb1, obb2, normal.getUnit(), minPenetrationDepth, obb1->getExtremeVertices(normal), obb2->getExtremeVertices(normal.getOpposite()), contact)
|
||||
|
||||
//std::cout << "Contact 1 : " << contact << std::endl;
|
||||
assert(*contact != 0);
|
||||
|
@ -457,8 +459,7 @@ bool NarrowPhaseSATAlgorithm::computeCollisionTest(const OBB* const obb1, const
|
|||
std::cout << "CONTACT FOUND AND TIMEFIRST IS " << timeFirst.getValue() << std::endl;
|
||||
|
||||
// Compute the collision contact
|
||||
// TODO : The normal has to be unit before passing it to the computeContact() method
|
||||
computeContact(obb1, obb2, normal.getUnit(), minPenetrationDepth, obb1->getExtremeVertices(normal), obb2->getExtremeVertices(normal.getOpposite()), Contact** contact)
|
||||
computeContact(obb1, obb2, normal.getUnit(), minPenetrationDepth, obb1->getExtremeVertices(normal), obb2->getExtremeVertices(normal.getOpposite()), contact)
|
||||
|
||||
// We have found no separation axis, therefore the two OBBs must collide
|
||||
assert(*contact != 0);
|
||||
|
|
|
@ -49,6 +49,7 @@ class NarrowPhaseSATAlgorithm : public NarrowPhaseAlgorithm {
|
|||
void computeContact(const OBB* const obb1, const OBB* const obb2, const Vector3D normal, double penetrationDepth,
|
||||
const std::vector<Vector3D>& obb1ExtremePoints, const std::vector<Vector3D>& obb2ExtremePoints, Contact** contact) const; // Compute a new contact // Compute a new collision contact between two projection intervals
|
||||
Vector3D computeContactNormal(const Vector3D& axis, const Vector3D& distanceOfOBBs) const; // Compute a contact normal
|
||||
|
||||
public :
|
||||
NarrowPhaseSATAlgorithm(); // Constructor
|
||||
~NarrowPhaseSATAlgorithm(); // Destructor
|
||||
|
|
Loading…
Reference in New Issue
Block a user