GBGeometryMath
AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: utils/gb_geometry_math.gd
Version: 5.0
class_name: GBGeometryMath
extends: (none)
Summary
Geometry & collision math utilities for the grid building addon.
Provides compact, well-documented helper functions used across the addon for tile/polygon overlap and collision tasks. Main responsibilities include:
- Computing polygon vs polygon intersection areas (uses Godot Geometry2D).
- Producing tile polygons for square and isometric tiles and testing polygon overlaps against tiles (area-based and optimized native collision checks).
- Converting various Shape2D types to polygon approximations for geometry processing (Rectangle, Circle, Capsule, ConvexPolygon, fallback to rect).
- Utility helpers: axis-aligned rectangle detection and polygon bounding rect.
Note: TILE SHAPE ENFORCEMENT: All functions use TileSet.TileShape enum values.[br] Use: TileSet.TILE_SHAPE_SQUARE, TileSet.TILE_SHAPE_ISOMETRIC, TileSet.TILE_SHAPE_HALF_OFFSET_SQUARE [br] Do NOT use: integers (0, 1, 2) or strings (“square”, “isometric”, etc.)
Signals
(none)
Exports
(none)
Methods
(none)