Return the appropriate normal

I'm not actually sure this is necessary...
This commit is contained in:
Eryn Wells 2014-08-02 10:39:56 -07:00
parent 20b88f6dac
commit 662867f529

View file

@ -148,9 +148,11 @@ Plane::compute_normal(const Vector3 &p)
if (!point_is_on_surface(p)) {
return Vector3::Zero;
}
// This one's easy since planes are defined by their normals. :)
return mNormal;
if (mNormal.dot(p) < 0.0) {
return mNormal;
} else {
return -mNormal;
}
}
} /* namespace charles */