GBCollisionTileFilter

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Helpers to normalize tile coverage and prune borderline tiles for mapper heuristics.

Source File: addons/grid_building/utils/gb_collision_tile_filter.gd

Extends: RefCounted

Public Methods

adjust_rect_tile_range

1
2
3
4
5
6
7
adjust_rect_tile_range(
    rect_size: Vector2,
    tile_size: Vector2,
    center_tile: Vector2i,
    start_tile: Vector2i,
    end_exclusive: Vector2i
) -> Dictionary

Flags: static

Collision Tile Filter Utilities Helpers to normalize tile coverage ranges and prune borderline tiles without embedding shape-size magic numbers in the mapper implementation. Adjust rectangle tile iteration bounds Ensures even tile counts along any axis are expanded to the next odd count for symmetric coverage around the rectangle’s world center tile. Parameters: • rect_size: Vector2 – world-space size of the rectangle AABB. • tile_size: Vector2 – tile size. • center_tile: Vector2i – tile containing the rectangle’s world center. • start_tile, end_exclusive: Vector2i – raw iteration bounds. Returns: Dictionary – keys: start, end_exclusive.


circle_tile_allowed

1
2
3
4
5
6
circle_tile_allowed(
    circle_center: Vector2,
    radius: float,
    tile_center: Vector2,
    tile_size: Vector2
) -> bool

Flags: static

Circle tile pruning Generic pruning based on the distance of the tile center from the circle center. Excludes extreme corner tiles whose centers lie beyond radius + half_tile allowance. Returns: bool – true if the tile is allowed.