intersectsLine method

bool intersectsLine(
  1. Line3 line
)

Implementation

bool intersectsLine(Line3 line) {
  // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.

  var startSign = distanceToPoint(line.start);
  var endSign = distanceToPoint(line.end);

  return (startSign < 0 && endSign > 0) || (endSign < 0 && startSign > 0);
}