From c92a3ade5204e500cb6af33d28b34bf80d91b545 Mon Sep 17 00:00:00 2001 From: "chappuis.daniel" Date: Tue, 21 Jul 2009 20:30:17 +0000 Subject: [PATCH] git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@178 92aac97c-a6ce-11dd-a772-7fcde58d38e6 --- sources/reactphysics3d/constraint/Constraint.cpp | 2 +- sources/reactphysics3d/constraint/Constraint.h | 16 ++++++++-------- sources/reactphysics3d/constraint/Contact.cpp | 2 +- sources/reactphysics3d/constraint/Contact.h | 4 ++-- .../constraint/EdgeEdgeContact.cpp | 2 +- .../reactphysics3d/constraint/EdgeEdgeContact.h | 2 +- .../constraint/EdgeVertexContact.cpp | 2 +- .../constraint/EdgeVertexContact.h | 2 +- .../constraint/FaceEdgeContact.cpp | 2 +- .../reactphysics3d/constraint/FaceEdgeContact.h | 2 +- .../constraint/FaceFaceContact.cpp | 2 +- .../reactphysics3d/constraint/FaceFaceContact.h | 2 +- .../constraint/FaceVertexContact.cpp | 2 +- .../constraint/FaceVertexContact.h | 2 +- .../constraint/VertexVertexContact.cpp | 2 +- .../constraint/VertexVertexContact.h | 2 +- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sources/reactphysics3d/constraint/Constraint.cpp b/sources/reactphysics3d/constraint/Constraint.cpp index 8dcb40ef..d3a7d09a 100644 --- a/sources/reactphysics3d/constraint/Constraint.cpp +++ b/sources/reactphysics3d/constraint/Constraint.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -Constraint::Constraint(Body& body1, Body& body2) +Constraint::Constraint(Body* const body1, Body* const body2) :body1(body1), body2(body2) { } diff --git a/sources/reactphysics3d/constraint/Constraint.h b/sources/reactphysics3d/constraint/Constraint.h index 5702af11..a073f33d 100644 --- a/sources/reactphysics3d/constraint/Constraint.h +++ b/sources/reactphysics3d/constraint/Constraint.h @@ -35,24 +35,24 @@ namespace reactphysics3d { */ class Constraint { private : - Body& body1; // Reference to the first body of the constraint - Body& body2; // Reference to the second body of the constraint + Body* const body1; // Pointer to the first body of the constraint + Body* const body2; // Pointer to the second body of the constraint public : - Constraint(Body& body1, Body& body2); // Constructor - virtual ~Constraint(); // Destructor + Constraint(Body* const body1, Body* const body2); // Constructor + virtual ~Constraint(); // Destructor - Body& getBody1() const; // Return the reference to the body 1 - Body& getBody2() const; // Return the reference to the body 2 + Body* const getBody1() const; // Return the reference to the body 1 + Body* const getBody2() const; // Return the reference to the body 2 }; // Return the reference to the body 1 -inline Body& Constraint::getBody1() const { +inline Body* const Constraint::getBody1() const { return body1; } // Return the reference to the body 2 -inline Body& Constraint::getBody2() const { +inline Body* const Constraint::getBody2() const { return body2; } diff --git a/sources/reactphysics3d/constraint/Contact.cpp b/sources/reactphysics3d/constraint/Contact.cpp index d8cbeb54..0c082dcb 100644 --- a/sources/reactphysics3d/constraint/Contact.cpp +++ b/sources/reactphysics3d/constraint/Contact.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -Contact::Contact(Body& body1, Body& body2, const Vector3D& normalVector) +Contact::Contact(Body* const body1, Body* const body2, const Vector3D& normalVector) :Constraint(body1, body2), normalVector(normalVector) { } diff --git a/sources/reactphysics3d/constraint/Contact.h b/sources/reactphysics3d/constraint/Contact.h index 75124ba9..177c9e16 100644 --- a/sources/reactphysics3d/constraint/Contact.h +++ b/sources/reactphysics3d/constraint/Contact.h @@ -41,8 +41,8 @@ class Contact : public Constraint { Vector3D normalVector; // Normal vector of the contact public : - Contact(Body& body1, Body& body2, const Vector3D& normalVector); // Constructor - virtual ~Contact(); // Destructor + Contact(Body* const body1, Body* const body2, const Vector3D& normalVector); // Constructor + virtual ~Contact(); // Destructor Vector3D getNormalVector() const; // Return the normal vector of the contact diff --git a/sources/reactphysics3d/constraint/EdgeEdgeContact.cpp b/sources/reactphysics3d/constraint/EdgeEdgeContact.cpp index e29e58c6..fff36166 100644 --- a/sources/reactphysics3d/constraint/EdgeEdgeContact.cpp +++ b/sources/reactphysics3d/constraint/EdgeEdgeContact.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -EdgeEdgeContact::EdgeEdgeContact(Body& body1, Body& body2, const Vector3D normalVector, const Segment3D& contactSegment) +EdgeEdgeContact::EdgeEdgeContact(Body* const body1, Body* const body2, const Vector3D normalVector, const Segment3D& contactSegment) :Contact(body1, body2, normalVector), contactSegment(contactSegment) { } diff --git a/sources/reactphysics3d/constraint/EdgeEdgeContact.h b/sources/reactphysics3d/constraint/EdgeEdgeContact.h index 2309fb23..c1a8b3c7 100644 --- a/sources/reactphysics3d/constraint/EdgeEdgeContact.h +++ b/sources/reactphysics3d/constraint/EdgeEdgeContact.h @@ -38,7 +38,7 @@ class EdgeEdgeContact : public Contact { Segment3D contactSegment; // Contact segment public : - EdgeEdgeContact(Body& body1, Body& body2, const Vector3D normalVector, const Segment3D& contactSegment); // Constructor + EdgeEdgeContact(Body* const body1, Body* const body2, const Vector3D normalVector, const Segment3D& contactSegment); // Constructor virtual ~EdgeEdgeContact(); // Destructor Segment3D getContactSegment() const; // Return the contact segment diff --git a/sources/reactphysics3d/constraint/EdgeVertexContact.cpp b/sources/reactphysics3d/constraint/EdgeVertexContact.cpp index b0ccd742..e2ed4b49 100644 --- a/sources/reactphysics3d/constraint/EdgeVertexContact.cpp +++ b/sources/reactphysics3d/constraint/EdgeVertexContact.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -EdgeVertexContact::EdgeVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex) +EdgeVertexContact::EdgeVertexContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Vector3D& contactVertex) :Contact(body1, body2, normalVector), contactVertex(contactVertex) { } diff --git a/sources/reactphysics3d/constraint/EdgeVertexContact.h b/sources/reactphysics3d/constraint/EdgeVertexContact.h index c79614d8..0390eeb0 100644 --- a/sources/reactphysics3d/constraint/EdgeVertexContact.h +++ b/sources/reactphysics3d/constraint/EdgeVertexContact.h @@ -39,7 +39,7 @@ class EdgeVertexContact : public Contact { Vector3D contactVertex; // Contact vertex public : - EdgeVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor + EdgeVertexContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor virtual ~EdgeVertexContact(); // Destructor Vector3D getContactVertex() const; // Return the contact vertex diff --git a/sources/reactphysics3d/constraint/FaceEdgeContact.cpp b/sources/reactphysics3d/constraint/FaceEdgeContact.cpp index 38eb9c28..a3e12267 100644 --- a/sources/reactphysics3d/constraint/FaceEdgeContact.cpp +++ b/sources/reactphysics3d/constraint/FaceEdgeContact.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -FaceEdgeContact::FaceEdgeContact(Body& body1, Body& body2, const Vector3D& normalVector, Segment3D& contactSegment) +FaceEdgeContact::FaceEdgeContact(Body* const body1, Body* const body2, const Vector3D& normalVector, Segment3D& contactSegment) :Contact(body1, body2, normalVector), contactSegment(contactSegment) { } diff --git a/sources/reactphysics3d/constraint/FaceEdgeContact.h b/sources/reactphysics3d/constraint/FaceEdgeContact.h index a52fad52..0e280369 100644 --- a/sources/reactphysics3d/constraint/FaceEdgeContact.h +++ b/sources/reactphysics3d/constraint/FaceEdgeContact.h @@ -38,7 +38,7 @@ class FaceEdgeContact : public Contact { Segment3D contactSegment; public : - FaceEdgeContact(Body& body1, Body& body2, const Vector3D& normalVector, Segment3D& contactSegment); // Constructor + FaceEdgeContact(Body* const body1, Body* const body2, const Vector3D& normalVector, Segment3D& contactSegment); // Constructor virtual ~FaceEdgeContact(); // Destructor Segment3D getContactSegment() const; // Return the contact segment diff --git a/sources/reactphysics3d/constraint/FaceFaceContact.cpp b/sources/reactphysics3d/constraint/FaceFaceContact.cpp index dfe71f70..7d83dcee 100644 --- a/sources/reactphysics3d/constraint/FaceFaceContact.cpp +++ b/sources/reactphysics3d/constraint/FaceFaceContact.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -FaceFaceContact::FaceFaceContact(Body& body1, Body& body2, const Vector3D& normalVector, const Polygon3D& contactPolygon) +FaceFaceContact::FaceFaceContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Polygon3D& contactPolygon) :Contact(body1, body2, normalVector), contactPolygon(contactPolygon) { } diff --git a/sources/reactphysics3d/constraint/FaceFaceContact.h b/sources/reactphysics3d/constraint/FaceFaceContact.h index 2a038c4c..8f452b22 100644 --- a/sources/reactphysics3d/constraint/FaceFaceContact.h +++ b/sources/reactphysics3d/constraint/FaceFaceContact.h @@ -38,7 +38,7 @@ class FaceFaceContact : public Contact { Polygon3D contactPolygon; public : - FaceFaceContact(Body& body1, Body& body2, const Vector3D& normalVector, const Polygon3D& contactPolygon); // Constructor + FaceFaceContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Polygon3D& contactPolygon); // Constructor virtual ~FaceFaceContact(); // Destructor Polygon3D getContactPolygon() const; // Return the contact polygon diff --git a/sources/reactphysics3d/constraint/FaceVertexContact.cpp b/sources/reactphysics3d/constraint/FaceVertexContact.cpp index af69723a..ac63df0b 100644 --- a/sources/reactphysics3d/constraint/FaceVertexContact.cpp +++ b/sources/reactphysics3d/constraint/FaceVertexContact.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -FaceVertexContact::FaceVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex) +FaceVertexContact::FaceVertexContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Vector3D& contactVertex) :Contact(body1, body2, normalVector), contactVertex(contactVertex) { } diff --git a/sources/reactphysics3d/constraint/FaceVertexContact.h b/sources/reactphysics3d/constraint/FaceVertexContact.h index 15617346..22db1c2d 100644 --- a/sources/reactphysics3d/constraint/FaceVertexContact.h +++ b/sources/reactphysics3d/constraint/FaceVertexContact.h @@ -38,7 +38,7 @@ class FaceVertexContact : public Contact { Vector3D contactVertex; // Contact vertex public : - FaceVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor + FaceVertexContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor virtual ~FaceVertexContact(); // Destructor Vector3D getContactVertex() const; // Return the contact vertex diff --git a/sources/reactphysics3d/constraint/VertexVertexContact.cpp b/sources/reactphysics3d/constraint/VertexVertexContact.cpp index 5ed6b790..74d1141b 100644 --- a/sources/reactphysics3d/constraint/VertexVertexContact.cpp +++ b/sources/reactphysics3d/constraint/VertexVertexContact.cpp @@ -24,7 +24,7 @@ using namespace reactphysics3d; // Constructor -VertexVertexContact::VertexVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex) +VertexVertexContact::VertexVertexContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Vector3D& contactVertex) :Contact(body1, body2, normalVector), contactVertex(contactVertex) { } diff --git a/sources/reactphysics3d/constraint/VertexVertexContact.h b/sources/reactphysics3d/constraint/VertexVertexContact.h index 6344b065..2bf36144 100644 --- a/sources/reactphysics3d/constraint/VertexVertexContact.h +++ b/sources/reactphysics3d/constraint/VertexVertexContact.h @@ -38,7 +38,7 @@ class VertexVertexContact : public Contact { Vector3D contactVertex; // Contact vertex public : - VertexVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor + VertexVertexContact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor virtual ~VertexVertexContact(); // Destructor Vector3D getContactVertex() const; // Return the contact vertex