git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@178 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
951725a401
commit
c92a3ade52
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user