Add object margin to TriangleShape
This commit is contained in:
parent
926fd1d352
commit
4362033018
|
@ -39,8 +39,8 @@ using namespace reactphysics3d;
|
||||||
* @param point3 Third point of the triangle
|
* @param point3 Third point of the triangle
|
||||||
* @param margin The collision margin (in meters) around the collision shape
|
* @param margin The collision margin (in meters) around the collision shape
|
||||||
*/
|
*/
|
||||||
TriangleShape::TriangleShape(const Vector3& point1, const Vector3& point2, const Vector3& point3)
|
TriangleShape::TriangleShape(const Vector3& point1, const Vector3& point2, const Vector3& point3, decimal margin)
|
||||||
: ConvexShape(TRIANGLE, 0) {
|
: ConvexShape(TRIANGLE, margin) {
|
||||||
mPoints[0] = point1;
|
mPoints[0] = point1;
|
||||||
mPoints[1] = point2;
|
mPoints[1] = point2;
|
||||||
mPoints[2] = point3;
|
mPoints[2] = point3;
|
||||||
|
|
|
@ -93,7 +93,8 @@ class TriangleShape : public ConvexShape {
|
||||||
// -------------------- Methods -------------------- //
|
// -------------------- Methods -------------------- //
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
TriangleShape(const Vector3& point1, const Vector3& point2, const Vector3& point3);
|
TriangleShape(const Vector3& point1, const Vector3& point2, const Vector3& point3,
|
||||||
|
decimal margin = OBJECT_MARGIN);
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
virtual ~TriangleShape();
|
virtual ~TriangleShape();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user