git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@224 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
40cb2dc7fd
commit
f9f67b7532
|
@ -24,8 +24,9 @@
|
|||
using namespace reactphysics3d;
|
||||
|
||||
// Constructor
|
||||
Contact::Contact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Time& time)
|
||||
:Constraint(body1, body2), normalVector(normalVector), time(time) {
|
||||
Contact::Contact(Body* const body1, Body* const body2, const Vector3D& normal,
|
||||
const std::vector<const Vector3D* const>& points)
|
||||
:Constraint(body1, body2), normal(normal) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -38,26 +38,21 @@ namespace reactphysics3d {
|
|||
*/
|
||||
class Contact : public Constraint {
|
||||
private :
|
||||
Vector3D normal; // Normal vector of the contact
|
||||
std::vector<const Vector3D* const> points;
|
||||
Vector3D normal; // Normal vector of the contact
|
||||
std::vector<const Vector3D* const> points; // Contact points
|
||||
|
||||
public :
|
||||
Contact(Body* const body1, Body* const body2, const Vector3D& normalVector, const Time& time); // Constructor
|
||||
virtual ~Contact(); // Destructor
|
||||
Contact(Body* const body1, Body* const body2, const Vector3D& normal,
|
||||
const std::vector<const Vector3D* const>& points); // Constructor
|
||||
virtual ~Contact(); // Destructor
|
||||
|
||||
Vector3D getNormalVector() const; // Return the normal vector of the contact
|
||||
Time getTime() const; // Return the time of contact
|
||||
Vector3D getNormal() const; // Return the normal vector of the contact
|
||||
|
||||
};
|
||||
|
||||
// Return the normal vector of the contact
|
||||
inline Vector3D Contact::getNormalVector() const {
|
||||
return normalVector;
|
||||
}
|
||||
|
||||
// Return the time of contact
|
||||
inline Time Contact::getTime() const {
|
||||
return time;
|
||||
inline Vector3D Contact::getNormal() const {
|
||||
return normal;
|
||||
}
|
||||
|
||||
} // End of the ReactPhysics3D namespace
|
||||
|
|
Loading…
Reference in New Issue
Block a user