geometry_cache_manager

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Manages caching for geometry calculations to improve performance.

Source File: addons/grid_building/placement/manager/components/mapper/geometry_cache_manager.gd

Extends: RefCounted

Private Properties

  • Property: _geometry_cache: Dictionary = {} (private)
  • Property: _polygon_bounds_cache: Dictionary = {} (private)
  • Property: _tile_polygon_cache: Dictionary = {} (private)
  • Property: _cache_frame: int = 0 (private)

Public Methods

invalidate_cache

1
invalidate_cache() -> void

Invalidates all cached geometry data when setup changes.


get_cached_polygon_bounds

1
get_cached_polygon_bounds(polygon: PackedVector2Array) -> Rect2

Gets cached polygon bounds or calculates and caches if not found.


get_cached_tile_polygon

1
2
3
4
5
get_cached_tile_polygon(
    tile_pos: Vector2,
    tile_size: Vector2,
    tile_type: TileSet.TileShape
) -> PackedVector2Array

Gets cached tile polygon or calculates and caches if not found.


get_cached_geometry_result

1
2
3
4
get_cached_geometry_result(
    cache_key: String,
    calculation_func: Callable
) -> Variant

Gets cached geometry calculation result or calculates and caches if not found.