IPreviewCalculationService
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
This page documents the supported public API surface only. Private, internal, benchmark, test, and implementation-detail types are intentionally omitted.
Declaration
Summary
Core service interface for calculating placement preview data. This interface contains pure business logic without Godot dependencies.
Metadata
Namespace: GridPlacement.Core.Interfaces.Placement
Source File: cs/Core/Interfaces/Placement/IPreviewCalculationService.cs
Assembly: GridPlacement.Core
Type: interface
Methods
CalculatePreview
Calculates preview data for a building at the given grid position.
Parameters
| Name | Description |
|---|---|
footprintData | The footprint data to create preview for |
gridPosition | The grid position for the preview |
existingOccupancy | Current grid occupancy data |
validityCheck | Whether to perform placement validity check |
Returns
Preview calculation result with visual and validity data
UpdatePreviewPosition
Updates preview data when the grid position changes.
Parameters
| Name | Description |
|---|---|
previousResult | Previous preview calculation result |
newGridPosition | New grid position |
existingOccupancy | Current grid occupancy data |
Returns
Updated preview calculation result
CalculateVisualAppearance
Calculates the visual appearance of the preview based on validity.
Parameters
| Name | Description |
|---|---|
isValid | Whether the placement is valid |
baseTransparency | Base transparency value |
validColor | CoreColor for valid placement |
invalidColor | CoreColor for invalid placement |
Returns
Visual settings for the preview
CalculateShapeConfiguration
Calculates shape configuration for a building footprint.
Parameters
| Name | Description |
|---|---|
footprint | The footprint data |
Returns
Shape configuration data
CheckGridBounds
Checks if a building fits within grid bounds at the given position.
Parameters
| Name | Description |
|---|---|
footprintData | The footprint data to check |
gridPosition | The grid position |
gridSize | Size of the grid |
Returns
True if the building fits within bounds