pass radials argument to AABox::touchesAAEllipsoid as const reference

This commit is contained in:
Seth Alves 2017-03-28 11:12:00 -07:00
parent 9789476a73
commit 1cf6945bf2
2 changed files with 2 additions and 2 deletions

View file

@ -436,7 +436,7 @@ glm::vec3 AABox::getClosestPointOnFace(const glm::vec4& origin, const glm::vec4&
return getClosestPointOnFace(glm::vec3(origin), face);
}
bool AABox::touchesAAEllipsoid(const glm::vec3& center, glm::vec3 radials) const {
bool AABox::touchesAAEllipsoid(const glm::vec3& center, const glm::vec3& radials) const {
// handle case where ellipsoid's alix-aligned box doesn't touch this AABox
if (_corner.x - radials.x > center.x ||
_corner.y - radials.y > center.y ||

View file

@ -70,7 +70,7 @@ public:
bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal) const;
bool touchesSphere(const glm::vec3& center, float radius) const; // fast but may generate false positives
bool touchesAAEllipsoid(const glm::vec3& center, glm::vec3 radials) const;
bool touchesAAEllipsoid(const glm::vec3& center, const glm::vec3& radials) const;
bool findSpherePenetration(const glm::vec3& center, float radius, glm::vec3& penetration) const;
bool findCapsulePenetration(const glm::vec3& start, const glm::vec3& end, float radius, glm::vec3& penetration) const;