PolygonTileOverlap
Helper: Compute polygon area using shoelace formula
Helper: Compute polygon area using shoelace formula
Version: v5.0.0
Inherits: RefCounted
Source: polygon_tile_overlap.gd
Parsing: AST-based for maximum accuracy with symbol typing
Methods
compute_overlap_area
Signature: static compute_overlap_area(polygon: PackedVector2Array, rect: Rect2) -> float
Returns: float – overlap area (>= 0).
Returns: float
Static: true
Parameters:
polygon: PackedVector2Arrayrect: Rect2
_compute_polygon_bounds
Signature: static _compute_polygon_bounds(polygon: PackedVector2Array) -> Rect2
Helper: Compute polygon bounding rectangle
Returns: Rect2
Static: true
Parameters:
polygon: PackedVector2Array
_clip_polygon_to_rect
Signature: static _clip_polygon_to_rect(polygon: PackedVector2Array, rect: Rect2) -> PackedVector2Array
Helper: Clip polygon against rectangle using Sutherland-Hodgman algorithm
Returns: PackedVector2Array
Static: true
Parameters:
polygon: PackedVector2Arrayrect: Rect2
_point_inside_boundary
Signature: static _point_inside_boundary(point: Vector2, boundary: Dictionary) -> bool
Helper: Test if point is inside clipping boundary
Returns: bool
Static: true
Parameters:
point: Vector2boundary: Dictionary
_compute_intersection
Signature: static _compute_intersection(a: Vector2, b: Vector2, boundary: Dictionary) -> Vector2
Helper: Compute line-boundary intersection
Returns: Vector2
Static: true
Parameters:
a: Vector2b: Vector2boundary: Dictionary
_compute_polygon_area
Signature: static _compute_polygon_area(polygon: PackedVector2Array) -> float
Helper: Compute polygon area using shoelace formula
Returns: float
Static: true
Parameters:
polygon: PackedVector2Array