CollisionGeometryCalculator
Pure function to check if two polygons intersect
Validation API reference for validation classes in GridBuilding v5-0
This section contains the API reference for all validation classes in the GridBuilding v5-0 plugin.
Pure function to check if two polygons intersect
[b]Returns[/b]
[b]Guard: Setup Validation[/b] Checks if setup() has been called and logs warnings if incomplete. [b]Returns[/b]: bool – true if setup is complete, false otherwise (logs and prevents continuation).
@param collision_obj: The CollisionObject2D to check @param layer_mask: The layer mask to match against @return true if the object matches the layer mask
@param polygon_node: The CollisionPolygon2D node to process. @param map: The TileMapLayer to map offsets against. @param logger: The logger for diagnostic output. @return A Dictionary[Vector2i, Array[CollisionPolygon2D]] containing tile offsets as keys and associated collision polygons as values.
Merge two collision position dictionaries
Whether to show a list of layers tested in output messages
@param target_positions: Dictionary to merge into (modified in-place) @param source_positions: Dictionary to merge from
Expands the rectangle by shape_stretch_size to ensure comprehensive tile coverage. Handles complex transforms by converting to squares when rotation/skew is present.
Expands the rectangle by shape_stretch_size to ensure comprehensive tile coverage. Handles complex transforms by converting to squares when rotation/skew is present.
Check if a collision object matches the given layer mask
Returns an array of issues found during runtime validation
Expands the rectangle by shape_stretch_size to ensure comprehensive tile coverage. Handles complex transforms by converting to squares when rotation/skew is present.
Sets up area_2d and collision_shape
Helpers to read debug tuning values from GBDebugSettings (if available).
Pick the appropriate display settings given validity state and failing rules.
Filters build rules to get all collision rules from an array of building rules.[br][br] [code]p_building_rules[/code]: [i]Array[PlacementRule][/i] - Array of placement rules to filter
Convenience accessor returning all issues (alias)
Pure logic class for rule validation operations. Contains no state and can be easily tested in isolation.
Finds the container for the spendable materials by searching either for the matching node by name or class name Starts at the user node of the building system and then checks children nodes recursively
Returns an array of issues found during runtime validation
Generates a concise summary string of the validation results.
Emits gated diagnostics when debug diagnostics are enabled
Pure function to check if two polygons intersect
[b]Returns[/b] - [code]bool[/code] — [code]true[/code]...
[b]Guard: Setup Validation[/b] Checks if...
@param collision_obj: The CollisionObject2D to...
@param polygon_node: The CollisionPolygon2D node...
Merge two collision position dictionaries
Whether to show a list of layers tested in output messages
Returns an array of issues found during runtime validation
@param target_positions: Dictionary to merge...
Expands the rectangle by shape_stretch_size...
Expands the rectangle by shape_stretch_size...
Check if a collision object matches the given layer mask
Expands the rectangle by shape_stretch_size...
Sets up area_2d and collision_shape
Helpers to read debug tuning values from GBDebugSettings (if available).
Pick the appropriate display settings given validity state and failing rules.
Filters build rules to get...
Convenience accessor returning all issues (alias)
Pure logic class for rule...
Finds the container for the...
Returns an array of issues found during runtime validation
Generates a concise summary string of the validation results.
Emits gated diagnostics when debug diagnostics are enabled