From 50ab3968829c4d8f3e31fbfc7187dd879d9c4201 Mon Sep 17 00:00:00 2001 From: "chappuis.daniel" Date: Sat, 2 Jan 2010 23:54:25 +0000 Subject: [PATCH] git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@245 92aac97c-a6ce-11dd-a772-7fcde58d38e6 --- sources/reactphysics3d/constraint/Contact.cpp | 4 ++-- sources/reactphysics3d/constraint/Contact.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sources/reactphysics3d/constraint/Contact.cpp b/sources/reactphysics3d/constraint/Contact.cpp index 4bf86736..70a80979 100644 --- a/sources/reactphysics3d/constraint/Contact.cpp +++ b/sources/reactphysics3d/constraint/Contact.cpp @@ -24,8 +24,8 @@ using namespace reactphysics3d; // Constructor -Contact::Contact(Body* const body1, Body* const body2, const Vector3D& normal, const std::vector& points) - :Constraint(body1, body2), normal(normal), points(points) { +Contact::Contact(Body* const body1, Body* const body2, const Vector3D& normal, double penetrationDepth, const std::vector& points) + :Constraint(body1, body2), normal(normal), penetrationDepth(penetrationDepth), points(points){ } diff --git a/sources/reactphysics3d/constraint/Contact.h b/sources/reactphysics3d/constraint/Contact.h index 85b7bc06..8fb90f50 100644 --- a/sources/reactphysics3d/constraint/Contact.h +++ b/sources/reactphysics3d/constraint/Contact.h @@ -39,11 +39,12 @@ namespace reactphysics3d { class Contact : public Constraint { private : Vector3D normal; // Normal vector of the contact (From body1 toward body2) - std::vector points; // Contact points + double penetrationDepth; // Penetration depth + std::vector points; // Contact points public : - Contact(Body* const body1, Body* const body2, const Vector3D& normal, const std::vector& points); // Constructor - virtual ~Contact(); // Destructor + Contact(Body* const body1, Body* const body2, const Vector3D& normal, double penetrationDepth, const std::vector& points); // Constructor + virtual ~Contact(); // Destructor Vector3D getNormal() const; // Return the normal vector of the contact };