Always return the normal, even if the point isn't in the plane

Getting so much closer!
This commit is contained in:
Eryn Wells 2014-08-02 15:40:13 -07:00
parent 5390600cdd
commit f03945c0f7

View file

@ -138,6 +138,9 @@ Plane::point_is_on_surface(const Vector3 &p)
} }
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
/* /*
* charles::Plane::compute_normal -- * charles::Plane::compute_normal --
*/ */
@ -145,10 +148,9 @@ Vector3
Plane::compute_normal(const Vector3 &p) Plane::compute_normal(const Vector3 &p)
const const
{ {
if (!point_is_on_surface(p)) {
return Vector3::Zero;
}
return mNormal; return mNormal;
} }
#pragma clang diagnostic pop
} /* namespace charles */ } /* namespace charles */