PhysicsLayerManager

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 PhysicsLayerManager

Summary

Core physics layer management for manipulation operations (engine-agnostic). Handles collision layer enabling/disabling during manipulation without engine dependencies.

Responsibilities:

  • Track physics layer state changes
  • Disable collision layers during manipulation
  • Restore original physics layer state
  • Provide physics layer validation

Metadata

Namespace: GridPlacement.Core.Services.Manipulation

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

Assembly: GridPlacement.Core

Type: class

Methods

DisableLayers

1
2
3
4
5
public bool DisableLayers(
    string objectId,
    List<int> layersToDisable,
    Dictionary<string, bool> disabledObjects
)

Disables specified physics layers for an object.

Parameters

NameDescription
objectIdUnique identifier for the object
layersToDisableList of layer numbers to disable
disabledObjectsDictionary to store disabled state for tracking

Returns

True if layers were successfully disabled


RestoreLayers

1
public bool RestoreLayers(string objectId)

Restores physics layers for an object.

Parameters

NameDescription
objectIdUnique identifier for the object

Returns

True if layers were successfully restored


RestoreAllLayers

1
public int RestoreAllLayers(Dictionary<string, bool> disabledObjects)

Restores all disabled physics layers.

Parameters

NameDescription
disabledObjectsDictionary of disabled objects to clean up

Returns

Number of objects restored


HasDisabledLayers

1
public bool HasDisabledLayers(string objectId)

Checks if an object has disabled physics layers.

Parameters

NameDescription
objectIdUnique identifier for the object

Returns

True if object has disabled layers


GetDisabledLayers

1
public List<int> GetDisabledLayers(string objectId)

Gets the disabled layers for an object.

Parameters

NameDescription
objectIdUnique identifier for the object

Returns

List of disabled layer numbers, or empty list if none


GetOriginalLayers

1
public List<int> GetOriginalLayers(string objectId)

Gets the original layers for an object before they were disabled.

Parameters

NameDescription
objectIdUnique identifier for the object

Returns

List of original layer numbers, or empty list if not found


IsValidLayer

1
public bool IsValidLayer(int layer)

Validates if a layer number is valid.

Parameters

NameDescription
layerLayer number to validate

Returns

True if layer is valid (0-31)


AreValidLayers

1
public bool AreValidLayers(List<int> layers)

Validates a list of layer numbers.

Parameters

NameDescription
layersList of layer numbers to validate

Returns

True if all layers are valid


GetDisabledObjects

1
public Dictionary<string, PhysicsLayerState> GetDisabledObjects()

Gets all currently disabled objects.

Returns

Dictionary of object IDs and their disabled states


ClearAllTracking

1
public void ClearAllTracking()

Clears all tracking data (for cleanup/reset).