Always return the normal, even if the point isn't in the plane
Getting so much closer!
This commit is contained in:
parent
5390600cdd
commit
f03945c0f7
1 changed files with 5 additions and 3 deletions
|
@ -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 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue