ManipulationTransformCalculator

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

ManipulationTransformCalculator - Pure logic component for manipulation transform calculations.

Source File: addons/grid_building/systems/manipulation/manipulation_transform_calculator.gd

Extends: RefCounted

Public Methods

calculate_final_transform

1
2
3
4
calculate_final_transform(
    preview_root: Node2D,
    manipulation_parent: Node2D
) -> Dictionary

Flags: static

Calculates the final transform components for a manipulated object. Extracts position, rotation, and scale from the manipulation preview, preserving flip semantics (negative scale values).

preview_root The preview object root (child of ManipulationParent) manipulation_parent The ManipulationParent containing accumulated transforms [return] Dictionary with keys: position (Vector2), rotation (float), scale (Vector2)


validate_transform_preservation

1
validate_transform_preservation(calculated_transforms: Dictionary) -> Dictionary

Flags: static

Validates that calculated transforms preserve flip semantics. Checks if negative scale values (flips) are preserved correctly.

calculated_transforms Dictionary from calculate_final_transform [return] Dictionary with keys: is_valid (bool), issues (Array[String])


format_transforms_debug

1
format_transforms_debug(transforms: Dictionary) -> String

Flags: static

Formats transform data for diagnostic output. Creates human-readable string representation of transform components.

transforms Dictionary with position, rotation, scale keys [return] Formatted string for logging/debugging


extract_transform_components

1
extract_transform_components(transform: Transform2D) -> Dictionary

Flags: static

Extracts transform components from a Transform2D for comparison. Breaks down a Transform2D into position, rotation, and scale for validation.

NOTE: Transform2D.basis normalizes negative scale to positive scale + rotation. This method extracts the effective values after normalization.

transform The Transform2D to extract from [return] Dictionary with position, rotation, scale keys