git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@165 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
0a058c266c
commit
824a16d3de
35
sources/reactphysics3d/constraint/EdgeEdgeContact.cpp
Normal file
35
sources/reactphysics3d/constraint/EdgeEdgeContact.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
// Libraries
|
||||
#include "EdgeEdgeContact.h"
|
||||
|
||||
// We want to use the ReactPhysics3D namespace
|
||||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
EdgeEdgeContact::EdgeEdgeContact(Body& body1, Body& body2, const Vector3D normalVector, const Segment3D& contactSegment)
|
||||
:Contact(body1, body2, normalVector), contactSegment(contactSegment) {
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
EdgeEdgeContact::~EdgeEdgeContact() {
|
||||
|
||||
}
|
55
sources/reactphysics3d/constraint/EdgeEdgeContact.h
Normal file
55
sources/reactphysics3d/constraint/EdgeEdgeContact.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef EDGEEDGECONTACT_H
|
||||
#define EDGEEDGECONTACT_H
|
||||
|
||||
// Libraries
|
||||
#include "Contact.h"
|
||||
#include "../mathematics/mathematics.h"
|
||||
|
||||
// ReactPhysics3D namespace
|
||||
namespace reactphysics3d {
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
Class EdgeEdgeContact :
|
||||
This class represents a edge-edge collision contact between two
|
||||
bodies in the physics engine.
|
||||
-------------------------------------------------------------------
|
||||
*/
|
||||
class EdgeEdgeContact : public Contact {
|
||||
private :
|
||||
Segment3D contactSegment; // Contact segment
|
||||
|
||||
public :
|
||||
EdgeEdgeContact(Body& body1, Body& body2, const Vector3D normalVector, const Segment3D& contactSegment); // Constructor
|
||||
virtual ~EdgeEdgeContact(); // Destructor
|
||||
|
||||
Segment3D getContactSegment() const; // Return the contact segment
|
||||
};
|
||||
|
||||
// Return the contact segment
|
||||
inline Segment3D EdgeEdgeContact::getContactSegment() const {
|
||||
return contactSegment;
|
||||
}
|
||||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
|
||||
#endif
|
||||
|
35
sources/reactphysics3d/constraint/EdgeVertexContact.cpp
Normal file
35
sources/reactphysics3d/constraint/EdgeVertexContact.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
// Libraries
|
||||
#include "EdgeVertexContact.h"
|
||||
|
||||
// We want to use the ReactPhysics3D namespace
|
||||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
EdgeVertexContact::EdgeVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex)
|
||||
:Contact(body1, body2, normalVector), contactVertex(contactVertex) {
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
EdgeVertexContact::~EdgeVertexContact() {
|
||||
|
||||
}
|
54
sources/reactphysics3d/constraint/EdgeVertexContact.h
Normal file
54
sources/reactphysics3d/constraint/EdgeVertexContact.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef EDGEVERTEXCONTACT_H
|
||||
#define EDGEVERTEXCONTACT_H
|
||||
|
||||
// Libraries
|
||||
#include "Contact.h"
|
||||
#include "../mathematics/mathematics.h"
|
||||
|
||||
// ReactPhysics3D namespace
|
||||
namespace reactphysics3d {
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
Class EdgeVertexContact :
|
||||
This class represents a edge-vertex collision contact between two
|
||||
bodies in the physics engine.
|
||||
-------------------------------------------------------------------
|
||||
*/
|
||||
class EdgeVertexContact : public Contact {
|
||||
private :
|
||||
Vector3D contactVertex; // Contact vertex
|
||||
|
||||
public :
|
||||
EdgeVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor
|
||||
virtual ~EdgeVertexContact(); // Destructor
|
||||
|
||||
Vector3D getContactVertex() const; // Return the contact vertex
|
||||
};
|
||||
|
||||
// Return the contact vertex
|
||||
inline Vector3D EdgeVertexContact::getContactVertex() const {
|
||||
return contactVertex;
|
||||
}
|
||||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
#endif
|
37
sources/reactphysics3d/constraint/FaceEdgeContact.cpp
Normal file
37
sources/reactphysics3d/constraint/FaceEdgeContact.cpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
// Libraries
|
||||
#include "FaceEdgeContact.h"
|
||||
|
||||
// We want to use the ReactPhysics3D namespace
|
||||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
FaceEdgeContact::FaceEdgeContact(Body& body1, Body& body2, const Vector3D& normalVector, Segment3D& contactSegment)
|
||||
:Contact(body1, body2, normalVector), contactSegment(contactSegment) {
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
FaceEdgeContact::~FaceEdgeContact() {
|
||||
|
||||
}
|
||||
|
||||
|
54
sources/reactphysics3d/constraint/FaceEdgeContact.h
Normal file
54
sources/reactphysics3d/constraint/FaceEdgeContact.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/****************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef FACEEDGECONTACT_H
|
||||
#define FACEEDGECONTACT_H
|
||||
|
||||
// Libraries
|
||||
#include "Contact.h"
|
||||
#include "../mathematics/mathematics.h"
|
||||
|
||||
// ReactPhysics3D namespace
|
||||
namespace reactphysics3d {
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
Class FaceEdgeContact :
|
||||
This class represents a face-edge collision contact between two
|
||||
bodies in the physics engine.
|
||||
-------------------------------------------------------------------
|
||||
*/
|
||||
class FaceEdgeContact : public contact {
|
||||
private :
|
||||
Segment3D contactSegment;
|
||||
|
||||
public :
|
||||
FaceEdgeContact(Body& body1, Body& body2, const Vector3D& normalVector, Segment3D& contactSegment); // Constructor
|
||||
virtual ~FaceEdgeContact(); // Destructor
|
||||
|
||||
Segment3D getContactSegment() const; // Return the contact segment
|
||||
};
|
||||
|
||||
// Return the contact segment
|
||||
inline Segment3D FaceEdgeContact::getContactSegment() const {
|
||||
return contactSegment;
|
||||
}
|
||||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
|
||||
#endif
|
35
sources/reactphysics3d/constraint/FaceFaceContact.cpp
Normal file
35
sources/reactphysics3d/constraint/FaceFaceContact.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/****************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
// Libraries
|
||||
#include "FaceFaceContact.h"
|
||||
|
||||
// We want to use the ReactPhysics3D namespace
|
||||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
FaceFaceContact::FaceFaceContact(Body& body1, Body& body2, const Vector3D& normalVector, const Polygon3D& contactPolygon)
|
||||
:Contact(body1, body2, normalVector), contactPolygon(contactPolygon) {
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
FaceFaceContact::~FaceFaceContact() {
|
||||
|
||||
}
|
54
sources/reactphysics3d/constraint/FaceFaceContact.h
Normal file
54
sources/reactphysics3d/constraint/FaceFaceContact.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/****************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef FACEFACECONTACT_H
|
||||
#define FACEFACECONTACT_H
|
||||
|
||||
// Libraries
|
||||
#include "Contact.h"
|
||||
#include "../mathematics/mathematics.h"
|
||||
|
||||
// ReactPhysics3D namespace
|
||||
namespace reactphysics3d {
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
Class FaceFaceContact :
|
||||
This class represents a face-face collision contact between two
|
||||
bodies in the physics engine.
|
||||
-------------------------------------------------------------------
|
||||
*/
|
||||
class FaceFaceContact : public Contact {
|
||||
private :
|
||||
Polygon3D contactPolygon;
|
||||
|
||||
public :
|
||||
FaceFaceContact(Body& body1, Body& body2, const Vector3D& normalVector, const Polygon3D& contactPolygon); // Constructor
|
||||
virtual ~FaceFaceContact(); // Destructor
|
||||
|
||||
Polygon3D getContactPolygon() const; // Return the contact polygon
|
||||
|
||||
};
|
||||
|
||||
// Return the contact polygon
|
||||
inline Polygon3D FaceFaceContact::getContactPolygon() const {
|
||||
return contactPolygon;
|
||||
}
|
||||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
#endif
|
35
sources/reactphysics3d/constraint/FaceVertexContact.cpp
Normal file
35
sources/reactphysics3d/constraint/FaceVertexContact.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/****************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
// Libraries
|
||||
#include "FaceVertexContact.h"
|
||||
|
||||
// We want to use the ReactPhysics3D namespace
|
||||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
FaceVertexContact::FaceVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex)
|
||||
:Contact(body1, body2, normalVector), contactVertex(contactVertex) {
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
FaceVertexContact::~FaceVertexContact() {
|
||||
|
||||
}
|
54
sources/reactphysics3d/constraint/FaceVertexContact.h
Normal file
54
sources/reactphysics3d/constraint/FaceVertexContact.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/****************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef FACEVERTEXCONTACT_H
|
||||
#define FACEVERTEXCONTACT_H
|
||||
|
||||
// Libraries
|
||||
#include "Contact.h"
|
||||
#include "../mathematics/mathematics.h"
|
||||
|
||||
// ReactPhysics3D namespace
|
||||
namespace reactphysics3d {
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
Class FaceVertexContact :
|
||||
This class represents a face-vertex collision contact between two
|
||||
bodies in the physics engine.
|
||||
-------------------------------------------------------------------
|
||||
*/
|
||||
class FaceVertexContact : public Contact {
|
||||
private :
|
||||
Vector3D contactVertex; // Contact vertex
|
||||
|
||||
public :
|
||||
FaceVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor
|
||||
virtual ~FaceVertexContact(); // Destructor
|
||||
|
||||
Vector3D getContactVertex() const; // Return the contact vertex
|
||||
};
|
||||
|
||||
// Return the contact vertex
|
||||
inline Vector3D FaceVertexContact::getContactVertex() const {
|
||||
return contactVertex;
|
||||
}
|
||||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
|
||||
#endif
|
35
sources/reactphysics3d/constraint/VertexVertexContact.cpp
Normal file
35
sources/reactphysics3d/constraint/VertexVertexContact.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/****************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
// Libraries
|
||||
#include "VertexVertexContact.h"
|
||||
|
||||
// We want to use the ReactPhysics3D namespace
|
||||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
VertexVertexContact::VertexVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex)
|
||||
:Contact(body1, body2, normalVector), contactVertex(contactVertex) {
|
||||
|
||||
}
|
||||
|
||||
// Destructor
|
||||
VertexVertexContact::~VertexVertexContact() {
|
||||
|
||||
}
|
55
sources/reactphysics3d/constraint/VertexVertexContact.h
Normal file
55
sources/reactphysics3d/constraint/VertexVertexContact.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/****************************************************************************
|
||||
* Copyright (C) 2009 Daniel Chappuis *
|
||||
****************************************************************************
|
||||
* This file is part of ReactPhysics3D. *
|
||||
* *
|
||||
* ReactPhysics3D is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* ReactPhysics3D is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with ReactPhysics3D. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef VERTEXVERTEXCONTACT_H
|
||||
#define VERTEXVERTEXCONTACT_H
|
||||
|
||||
// Libraries
|
||||
#include "Contact.h"
|
||||
#include "../mathematics/mathematics.h"
|
||||
|
||||
// ReactPhysics3D namespace
|
||||
namespace reactphysics3d {
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
Class VertexVertexContact :
|
||||
This class represents a vertex-vertex collision contact between two
|
||||
bodies in the physics engine.
|
||||
-------------------------------------------------------------------
|
||||
*/
|
||||
class VertexVertexContact : public Contact {
|
||||
private :
|
||||
Vector3D contactVertex; // Contact vertex
|
||||
|
||||
public :
|
||||
VertexVertexContact(Body& body1, Body& body2, const Vector3D& normalVector, const Vector3D& contactVertex); // Constructor
|
||||
virtual ~VertexVertexContact(); // Destructor
|
||||
|
||||
Vector3D getContactVertex() const; // Return the contact vertex
|
||||
|
||||
};
|
||||
|
||||
// Return the contact vertex
|
||||
inline Vector3D VertexVertexContact::getContactVertex() const {
|
||||
return contactVertex;
|
||||
}
|
||||
|
||||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user