public static class TerrainSplineSpawnerTurning PlaceAlong's list into entities.
Remarks
[docs/plan/31 § T8]'s owed item. PlaceAlong returns a list of TerrainSplineMesh and deliberately does not spawn anything: it lives in Vixen.Terrain, which is device-free and world-free by [§ D1], and a kernel that created entities would be a kernel that needs an ECS to test.
⚠ A regeneration removes what it made and nothing else. Every entity carries the spline that placed it, so laying a road down again deletes that road's posts and leaves both the hand-placed ones and every other road's alone. Without the tag the choice is between duplicating on every regeneration and deleting an artist's work.
⚠ Removed and re-created rather than moved, which is the opposite of what the terrain deformation does. A deformation is a rectangle of numbers and can be recomputed in place; a placement's count changes with the spacing and the length, so matching old entities to new ones would be an alignment problem to save an allocation. The undo record is the same size either way.
Methods (3)
public static int Spawn(World world, string spline, IReadOnlyList<TerrainSplineMesh> meshes, Func<string, AssetReference>? resolve = null)Spawns an entity per placed mesh, replacing whatever that spline placed before.
public static int Clear(World world, string spline = "")Removes every entity a spline placed.
public static IReadOnlyList<Entity> Placed(World world, string spline = "")Every entity a spline placed, in no particular order.
Used by (2)
- TerrainSplineSpawnerTestsVixen.Rendering.Terrain.Tests
- TerrainModuleVixen.Editor.Terrain