GeometryCacheManager
Gets cached geometry calculation result or calculates and caches if not found.
Gets cached geometry calculation result or calculates and caches if not found.
Version: v5.0.0
Inherits: RefCounted
Source: geometry_cache_manager.gd
Parsing: AST-based for maximum accuracy with symbol typing
Variables
_geometry_cache:
_polygon_bounds_cache:
_tile_polygon_cache:
_cache_frame:
Methods
invalidate_cache
Signature: invalidate_cache() -> void
Invalidates all cached geometry data when setup changes.
Returns: void
get_cached_polygon_bounds
Signature: get_cached_polygon_bounds(polygon: PackedVector2Array) -> Rect2
Gets cached polygon bounds or calculates and caches if not found.
Returns: Rect2
Parameters:
polygon: PackedVector2Array
get_cached_tile_polygon
Signature: get_cached_tile_polygon(tile_pos: Vector2, tile_size: Vector2, tile_type: TileSet.TileShape: Variant) -> PackedVector2Array
Gets cached tile polygon or calculates and caches if not found.
Returns: PackedVector2Array
Parameters:
tile_pos: Vector2tile_size: Vector2tile_type: TileSet.TileShape: Variant
get_cached_geometry_result
Signature: get_cached_geometry_result(cache_key: String, calculation_func: Callable) -> Variant
Gets cached geometry calculation result or calculates and caches if not found.
Returns: Variant
Parameters:
cache_key: Stringcalculation_func: Callable