diff --git a/sources/reactphysics3d/body/OBB.cpp b/sources/reactphysics3d/body/OBB.cpp index e9df6dec..a7c9767c 100644 --- a/sources/reactphysics3d/body/OBB.cpp +++ b/sources/reactphysics3d/body/OBB.cpp @@ -24,7 +24,6 @@ #include // TODO : Remove this in the final version #include #include -#include // TODO : Delete this // We want to use the ReactPhysics3D namespace using namespace reactphysics3d; @@ -116,7 +115,7 @@ void OBB::draw() const { } // Return all the vertices that are projected at the extreme of the projection of the bouding volume on the axis. -// Be careful when this method returns vertices of a polygonal face because vertices are not necessarly ordered. +// If the extreme vertices are part of a face of the OBB, the returned vertices will be ordered according to the face. std::vector OBB::getExtremeVertices(const Vector3D& directionAxis) const { assert(directionAxis.length() != 0); @@ -180,7 +179,7 @@ std::vector OBB::getExtremeVertices(const Vector3D& directionAxis) con // Return the 4 vertices of a face of the OBB. The 4 vertices will be ordered. The convention is that the index 0 corresponds to // the face in the direction of the axis[0], 1 corresponds to the face in the opposite direction of the axis[0], 2 corresponds to // the face in the direction of the axis[1], etc. -std::vector OBB::getFace(int index) const throw(std::invalid_argument) { +std::vector OBB::getFace(unsigned int index) const throw(std::invalid_argument) { // Check the argument if (index >=0 && index <6) { std::vector vertices; diff --git a/sources/reactphysics3d/body/OBB.h b/sources/reactphysics3d/body/OBB.h index 34eb3b64..675f1cd1 100644 --- a/sources/reactphysics3d/body/OBB.h +++ b/sources/reactphysics3d/body/OBB.h @@ -54,7 +54,7 @@ class OBB : public BoundingVolume { Vector3D getAxis(unsigned int index) const throw(std::invalid_argument); // Return an axis of the OBB void setAxis(unsigned int index, const Vector3D& axis) throw(std::invalid_argument); // Set an axis Vector3D getVertex(unsigned int index) const throw (std::invalid_argument); // Return a vertex of the OBB - std::vector getFace(int index) const throw(std::invalid_argument); // Return the 4 vertices the OBB's face in the direction of a given axis + std::vector getFace(unsigned int index) const throw(std::invalid_argument); // Return the 4 vertices the OBB's face in the direction of a given axis double getExtent(unsigned int index) const throw(std::invalid_argument); // Return an extent value void setExtent(unsigned int index, double extent) throw(std::invalid_argument); // Set an extent value virtual std::vector getExtremeVertices(const Vector3D& axis) const; // Return all the vertices that are projected at the extreme of the projection of the bouding volume on the axis