Skip to content

Class

CollisionGeometryCalculator

Generated GDScript class reference for GridPlacement.CollisionGeometryCalculator.

Status
Current
Version
v6.1.0
Source updated
2026-09-24
Generated on
2026-09-23

Stateless collision geometry math: Sutherland-Hodgman polygon clipping for polygon-rectangle overlap, plus shoelace area and point/intersection tests. Clipping handles both convex and concave polygons. The polygon clips against the four rectangle boundaries in turn; the area of the result decides whether the overlap meets the threshold. Default thresholds: 0.01 edge epsilon and 0.05 minimum overlap ratio, so sub-5% micro-overlaps are ignored. All clipping methods are public for unit testing.

Source: addons/grid_placement/placement/manager/components/collision_geometry_calculator.gd

Syntax

class CollisionGeometryCalculator extends RefCounted

Members

NameKindSummary
debug_polygon_overlapProperty
AREA_REL_EPSField
AREA_ABS_EPSField
calculate_tile_overlapMethod
calculate_tile_overlap_numericMethod
overlapped_tilesProperty
boundsProperty
start_tileProperty
end_tileProperty
tile_posProperty
tile_world_centerProperty
tile_rectProperty
overlapped_tilesProperty
boundsProperty
rangeProperty
start_tileProperty
end_exclusiveProperty
end_tileProperty
tile_posProperty
tile_world_centerProperty
tile_size_vecProperty
tile_rectProperty
overlapped_tilesProperty
boundsProperty
top_left_worldProperty
bottom_right_worldProperty
top_right_worldProperty
bottom_left_worldProperty
corners_tileProperty
min_tile_xProperty
max_tile_xProperty
min_tile_yProperty
max_tile_yProperty
tile_posProperty
tile_world_centerProperty
tile_sizeProperty
half_widthProperty
half_heightProperty
tile_diamondProperty
overlapped_tilesProperty
boundsProperty
top_left_worldProperty
bottom_right_worldProperty
top_right_worldProperty
bottom_left_worldProperty
corners_tileProperty
min_tile_xProperty
max_tile_xProperty
min_tile_yProperty
max_tile_yProperty
tile_posProperty
tile_world_centerProperty
tile_sizeProperty
half_wProperty
quarter_hProperty
half_hProperty
tile_hexProperty
detect_collisionsMethod
bounds1Property
bounds2Property
polygons_overlapMethod
polygon_overlaps_rectMethod
clip_polygon_to_rectMethod
point_inside_boundaryMethod
polygon_areaMethod
point_in_polygonMethod