提交 da2ae7c7 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #11819 from casawa/patch-1

Fix sphere's intersectsPlane method
......@@ -107,15 +107,7 @@ Object.assign( Sphere.prototype, {
intersectsPlane: function ( plane ) {
// We use the following equation to compute the signed distance from
// the center of the sphere to the plane.
//
// distance = q * n - d
//
// If this distance is greater than the radius of the sphere,
// then there is no intersection.
return Math.abs( this.center.dot( plane.normal ) - plane.constant ) <= this.radius;
return Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册