ManipulationTransformHandler

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

1
public class ManipulationTransformHandler

Summary

Core transform operations for manipulated objects (engine-agnostic). Handles rotation, flip, and other transform operations without engine dependencies.

Responsibilities:

  • Apply rotation transformations
  • Apply horizontal/vertical flips
  • Preserve transform state
  • Provide rotation utility functions

Metadata

Namespace: GridPlacement.Core.Services.Manipulation

Source File: cs/Core/Services/Manipulation/ManipulationTransformHandler.cs

Assembly: GridPlacement.Core

Type: class

Methods

ApplyRotation

1
2
3
4
public float ApplyRotation(
    float currentRotation,
    float degrees
)

Applies rotation to target transform.

Parameters

NameDescription
currentRotationCurrent rotation in degrees
degreesRotation amount in degrees (0-360)

Returns

New rotation in degrees


ApplyFlipHorizontal

1
public CoreVector2 ApplyFlipHorizontal(CoreVector2 currentScale)

Applies horizontal flip (mirror across Y axis).

Parameters

NameDescription
currentScaleCurrent scale vector

Returns

Scale magnitude normalized without encoding flip in scale X


ApplyFlipVertical

1
public CoreVector2 ApplyFlipVertical(CoreVector2 currentScale)

Applies vertical flip (mirror across X axis).

Parameters

NameDescription
currentScaleCurrent scale vector

Returns

Scale magnitude normalized without encoding flip in scale Y


ApplyFlipHorizontal

1
public TransformState ApplyFlipHorizontal(TransformState currentState)

Applies a horizontal flip by toggling explicit flip state while preserving scale magnitude.

Parameters

NameDescription
currentStateCurrent transform state

Returns

Updated transform state with horizontal flip state toggled


ApplyFlipVertical

1
public TransformState ApplyFlipVertical(TransformState currentState)

Applies a vertical flip by toggling explicit flip state while preserving scale magnitude.

Parameters

NameDescription
currentStateCurrent transform state

Returns

Updated transform state with vertical flip state toggled


ApplyRotationRadians

1
2
3
4
public float ApplyRotationRadians(
    float currentRotation,
    float radians
)

Applies rotation in radians to target transform.

Parameters

NameDescription
currentRotationCurrent rotation in radians
radiansRotation amount in radians

Returns

New rotation in radians


SetRotation

1
public float SetRotation(float degrees)

Sets absolute rotation.

Parameters

NameDescription
degreesAbsolute rotation in degrees

Returns

Rotation in degrees


SetRotationRadians

1
public float SetRotationRadians(float radians)

Sets absolute rotation in radians.

Parameters

NameDescription
radiansAbsolute rotation in radians

Returns

Rotation in radians


ResetRotation

1
public float ResetRotation()

Resets rotation to identity (0 degrees).

Returns

Identity rotation (0 degrees)


ResetScale

1
public CoreVector2 ResetScale()

Resets scale to identity (1, 1).

Returns

Identity scale


IsFlippedHorizontal

1
public bool IsFlippedHorizontal(CoreVector2 scale)

Checks if the scale is flipped horizontally.

Parameters

NameDescription
scaleScale vector to check

Returns

Always false because flip state is no longer encoded in scale X


IsFlippedVertical

1
public bool IsFlippedVertical(CoreVector2 scale)

Checks if the scale is flipped vertically.

Parameters

NameDescription
scaleScale vector to check

Returns

Always false because flip state is no longer encoded in scale Y


NormalizeRotation

1
public static float NormalizeRotation(float degrees)

Normalizes rotation to 0-360 degree range.

Parameters

NameDescription
degreesRotation to normalize

Returns

Normalized rotation in degrees


NormalizeRotationRadians

1
public static float NormalizeRotationRadians(float radians)

Normalizes rotation to 0-2π radian range.

Parameters

NameDescription
radiansRotation to normalize

Returns

Normalized rotation in radians


DegreesToRadians

1
public static float DegreesToRadians(float degrees)

Converts degrees to radians.

Parameters

NameDescription
degreesAngle in degrees

Returns

Angle in radians


RadiansToDegrees

1
public static float RadiansToDegrees(float radians)

Converts radians to degrees.

Parameters

NameDescription
radiansAngle in radians

Returns

Angle in degrees


ApplySnappedRotation

1
2
3
4
5
public float ApplySnappedRotation(
    float currentRotation,
    float degrees,
    float increment
)

Applies a rotation that snaps to the nearest increment.

Parameters

NameDescription
currentRotationCurrent rotation in degrees
degreesDesired rotation in degrees
incrementSnap increment in degrees

Returns

Snapped rotation in degrees