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

This commit is contained in:
chappuis.daniel 2010-02-06 19:39:33 +00:00
parent 298b66ef2a
commit 13d79612a0
2 changed files with 17 additions and 0 deletions

View File

@ -19,6 +19,8 @@
// Libraries
#include "Contact.h"
#include <GL/freeglut.h> // TODO : Remove this in the final version
#include <GL/gl.h> // TODO : Remove this in the final version
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
@ -33,3 +35,9 @@ Contact::Contact(Body* const body1, Body* const body2, const Vector3D& normal, d
Contact::~Contact() {
}
// TODO : Delete this (Used to debug collision detection)
void Contact::draw() const {
glColor3f(1.0, 0.0, 0.0);
glutSolidSphere(0.5, 20, 20);
}

View File

@ -47,6 +47,9 @@ class Contact : public Constraint {
virtual ~Contact(); // Destructor
Vector3D getNormal() const; // Return the normal vector of the contact
std::vector<Vector3D> getPoints() const; // Return the contact points
void draw() const; // TODO : Delete this (Used to debug collision detection)
};
// Return the normal vector of the contact
@ -54,6 +57,12 @@ inline Vector3D Contact::getNormal() const {
return normal;
}
// Return the contact points
inline std::vector<Vector3D> Contact::getPoints() const {
return points;
}
} // End of the ReactPhysics3D namespace
#endif