Editor/Walkway/ArchWalkwaySpan.cs

A simple data container used by the editor for arch walkway geometry. It stores span bounds for both the structural slab and the deck, an orientation flag, and lists of mouth segments and the rooms those mouths connect to.

using System;
using System.Collections.Generic;
using System.Linq;
using Sandbox;

namespace Sunless.Architecture;


public sealed class ArchWalkwaySpan
{
	public Vector2 Min { get; init; }
	public Vector2 Max { get; init; }
	// The deck stops on the host wall's CENTRELINE while the slab runs on to its inner face, so the
	// two extents are not the same rectangle and neither can be derived from the other after the fact.
	public Vector2 DeckMin { get; init; }
	public Vector2 DeckMax { get; init; }
	public bool AlongX { get; init; }
	public IReadOnlyList<(Vector2 From, Vector2 To)> Mouths { get; init; }
	// The rooms the mouths cut, in mouth order - the far one may be a storey up.
	public IReadOnlyList<ArchRoom> EndRooms { get; init; } = Array.Empty<ArchRoom>();
}