IManipulationService
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
Interface for manipulation-related business logic and state management. Handles object manipulation operations like move, rotate, scale, and complex transformations.
NOTE: For ECS-based implementations, use the GridPlacement.Godot.ECS project which provides ECS systems and components for manipulation.
Metadata
Namespace: GridPlacement.Core.Services.Manipulation
Source File: cs/Core/Services/Manipulation/IManipulationService.cs
Assembly: GridPlacement.Core
Type: interface
Methods
StartManipulation
Starts a new manipulation session.
Parameters
| Name | Description |
|---|---|
mode | Grid mode that the manipulation represents. |
origin | Grid origin position. |
Returns
The created manipulation state.
UpdateManipulationTarget
Updates the target position for an active manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
target | New target position. |
Returns
True if the target was updated.
CancelManipulation
Cancels an active manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
Returns
True if the manipulation was cancelled.
CompleteManipulation
Completes an active manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
Returns
True if the manipulation was completed.
AddConstraint
Adds a constraint to the manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
constraint | Constraint to add. |
Returns
True if the constraint was added.
RemoveConstraint
Removes a constraint from the manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
constraintId | Constraint identifier. |
Returns
True if the constraint was removed.
AddAction
Adds an action definition to the manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
action | Action definition to add. |
Returns
True if the action was added.
RemoveAction
Removes an action definition from the manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
actionId | Action identifier. |
Returns
True if the action was removed.
SetContextData
Stores custom context data for a manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
key | Context key. |
value | Context value. |
Returns
True if the value was stored.
GetContextData
Reads custom context data for a manipulation.
Type Parameters
| Name | Description |
|---|---|
T | Expected value type. |
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
key | Context key. |
defaultValue | Default value if the key is absent. |
Returns
The stored value if present; otherwise defaultValue.
ApplyPreviewIntent
Applies a manipulation intent (rotate/flip) to the current preview transform state. This is a data-only operation; engine layers are responsible for applying the resulting PreviewTransformModel to actual nodes.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
action | Transform intent (rotate/flip). |
Returns
True if the intent was applied; otherwise false.
GetPreviewTransform
Gets the current preview transform model for a manipulation.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
Returns
The model if the manipulation exists; otherwise null.
GetManipulation
Gets a manipulation by id.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
Returns
The manipulation state or null.
GetActiveManipulations
Returns all active manipulations.
GetManipulationsByMode
Returns active manipulations filtered by mode.
Parameters
| Name | Description |
|---|---|
mode | Mode to filter by. |
IsManipulationActive
Returns true if the specified manipulation is active.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
CanStartManipulation
Returns true if a manipulation can be started for the given mode and origin.
Parameters
| Name | Description |
|---|---|
mode | Mode to start. |
origin | Origin position. |
ValidateManipulation
Validates the manipulation by id.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
ValidateManipulationState
Validates the manipulation state and returns a list of issues.
Parameters
| Name | Description |
|---|---|
manipulation | Manipulation state to validate. |
Returns
List of validation errors and warnings.
RegisterManipulation
Registers a manipulation state instance for tracking.
Parameters
| Name | Description |
|---|---|
manipulation | Manipulation to register. |
UnregisterManipulation
Unregisters a manipulation by id.
Parameters
| Name | Description |
|---|---|
manipulationId | Manipulation identifier. |
ClearAllManipulations
Clears all active manipulations.
Events
ManipulationStarted
Raised when a manipulation starts.
ManipulationUpdated
Raised when an active manipulation updates its target or affected area.
ManipulationCompleted
Raised when a manipulation completes successfully.
ManipulationCancelled
Raised when a manipulation is cancelled.
ManipulationFailed
Raised when a manipulation fails (validation error or runtime failure).