(Ray) Fixed Intersect(Plane, T) method

Former-commit-id: 5acfae80d778087a2e2b423d34da8a218a802cd4
This commit is contained in:
Lynix 2015-01-24 16:18:06 +01:00
parent 0e48f052e5
commit cdff689403
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ bool NzRay<T>::Intersect(const NzPlane<T>& plane, T* hit) const
if (NzNumberEquals(divisor, F(0.0))) if (NzNumberEquals(divisor, F(0.0)))
return false; // perpendicular return false; // perpendicular
T lambda = -(plane.normal.DotProduct(origin) - plane.distance) / divisor; // The plane is ax+by+cz=d T lambda = -(plane.normal.DotProduct(origin) + plane.distance) / divisor; // The plane is ax+by+cz=d
if (lambda < F(0.0)) if (lambda < F(0.0))
return false; // Le plan est derrière le rayon return false; // Le plan est derrière le rayon