Editor/Layers/ArchLayerHitStack.cs

Defines hit-test result types for an editor architecture layer. ArchHitChannel enumerates kinds of geometry a cursor can hit. ArchHit is an immutable record-like class holding which layer was hit, the channel, distance, depth and whether the hit is a direct (inside) hit.

Reflection
namespace Sunless.Architecture;

// What the cursor actually touched on an authored layer - one entry per geometry answer, not a
// single winner. The picker ranks the stack; the tree remains the deterministic escape hatch.
public enum ArchHitChannel
{
	Footprint,
	Boundary,
	Path,
	Span,
	Volume,
	Handle,
	Anchor,
}

public sealed class ArchHit
{
	public ArchLayerRef Layer { get; init; }
	public ArchHitChannel Channel { get; init; }
	public float Distance { get; init; }
	public int Depth { get; init; }
	// True when the cursor is inside the authored shape itself; a wall met at arm's length is not.
	public bool Direct { get; init; }
}