Update README with project details and setup instructions; add data directories to .gitignore

This commit is contained in:
Leonid Pershin
2026-08-16 17:09:16 +03:00
parent 9d09d6e97f
commit 8460921bfa
73 changed files with 6978 additions and 1 deletions
@@ -0,0 +1,31 @@
using Arch.Core;
using TheLivingWorld.Core.Ecs;
using TheLivingWorld.Core.Geo;
using TheLivingWorld.Core.Worlds;
namespace TheLivingWorld.Core.Systems;
/// <summary>Fills every feature's cached world-space extent from the geometry it points at.</summary>
public sealed class ComputeBoundsSystem : IWorldSystem
{
private static readonly QueryDescription AreaFeatures = new QueryDescription().WithAll<Outline, Bounds>();
private static readonly QueryDescription LineFeatures = new QueryDescription().WithAll<Polyline, Bounds>();
public string Name => nameof(ComputeBoundsSystem);
public void Execute(GameWorld world)
{
var shapes = world.Shapes;
// Holes are contained by their outline, so the outline alone determines the extent.
world.Ecs.Query(in AreaFeatures, (ref Outline outline, ref Bounds bounds) =>
{
bounds.Value = RectBounds.FromPoints(shapes.Get(outline.ShapeId));
});
world.Ecs.Query(in LineFeatures, (ref Polyline line, ref Bounds bounds) =>
{
bounds.Value = RectBounds.FromPoints(shapes.Get(line.ShapeId));
});
}
}