Fixed Bug in Equation For Intersection of Line and Plane

The equation to find the value of ’t' for the intersection of a line and a plane does not appear to be entirely correct.  Please double-check.
This commit is contained in:
Victor 2017-05-23 20:40:47 -07:00 committed by GitHub
parent e105f60ab7
commit 1313abe4ce

View File

@ -125,7 +125,7 @@ function factory (type, config, load, typed) {
}
function _intersectLinePlane(x1, y1, z1, x2, y2, z2, x, y, z, c){
var t = (c - x1*x - y1*y - z1*z)/(x2*x + y2*y + z2*z - x1 - y1 - z1);
var t = (c - x1*x - y1*y - z1*z)/(x2*x + y2*y + z2*z - x1*x - y1*y - z1*z);
var px = x1 + t * (x2 - x1);
var py = y1 + t * (y2 - y1);
var pz = z1 + t * (z2 - z1);