Quick way to check rectangle intersection.
For more optimized implementation, store the rectangle's sides separately (eg, Rectangle.sides()
) and use Polygon.intersect2D()
.
a Group of 2 Pts representing a rectangle
a Group of 2 Pts representing a rectangle
Generated using TypeDoc
Rectangle class provides static functions to create and operate on rectangles. A rectangle is usually represented as a Group of 2 Pts, marking the top-left and bottom-right corners of the rectangle. You can use the static function as-is, or apply the
op
method in Group or Pt to many of these functions. See Op guide for details.