Skip to content

Class

CollisionGeometryCalculator

Generated GDScript class reference for GridPlacement.CollisionGeometryCalculator.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

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
tile_rangeProperty
start_tileProperty
end_exclusiveProperty
tile_posProperty
tile_world_centerProperty
tile_size_vecProperty
tile_rectProperty
overlapped_tilesProperty
boundsProperty
spanProperty
tile_posProperty
tile_world_centerProperty
tile_sizeProperty
half_widthProperty
half_heightProperty
tile_diamondProperty
overlapped_tilesProperty
boundsProperty
spanProperty
tile_posProperty
tile_world_centerProperty
tile_sizeProperty
half_wProperty
quarter_hProperty
half_hProperty
tile_hexProperty
polygons_overlapMethod
polygon_overlaps_rectMethod
clip_polygon_to_rectMethod
point_inside_boundaryMethod
polygon_areaMethod
point_in_polygonMethod