RectExtension extension
- on
Methods
-
containsPoint(
Vector2 point) → bool - Whether this Rect contains a Vector2 point or not
-
intersectsLineSegment(
LineSegment segment) → bool - Whether the LineSegment intersects the Rect
-
intersectsSegment(
Vector2 pointA, Vector2 pointB) → bool -
Whether the segment formed by
pointA
andpointB
intersects this Rect -
randomPoint(
[Random? random]) → Vector2 - Generates a random point within the bounds of this Rect.
-
toFlameRectangle(
) → Rectangle - Converts this Rect into a flame.Rectangle.
-
toMathRectangle(
) → Rectangle< num> - Converts this Rect into a math.Rectangle.
-
toOffset(
) → Offset - Creates an Offset from this Rect
-
toRectangleComponent(
) → RectangleComponent - Converts this Rect into a RectangleComponent.
-
toVector2(
) → Vector2 - Creates a Vector2 starting in top left and going to (width, height).
-
toVertices(
) → List< Vector2> -
transform(
Matrix4 matrix) → Rect -
Transform Rect using the transformation defined by
matrix
.