public readonly record struct TerrainSplineProfileHow a spline shapes the ground either side of it.
Remarks
[docs/plan/31 § T8]'s road profile. A flat carriageway of HalfWidth metres either side, then a cosine shoulder that blends into whatever the ground was doing.
⚠ Left and right are independent, and that is not symmetry for its own sake. A road cut into a hillside has a cutting on the uphill side and an embankment on the downhill one, and they are different widths. A single falloff makes every road look like it was laid on a plain.
⚠ A cosine and not a linear ramp. A linear shoulder meets the untouched ground at a crease, which catches the light along the whole length of the road — a cosine's derivative is zero at both ends, so the shoulder leaves and arrives flat.
Fields and properties (7)
public float HalfWidthHow far the flat carriageway reaches either side of the curve, in metres.
public float FalloffLeftHow far the shoulder reaches past that on the left, in metres.
public float FalloffRightAnd on the right.
public float StrengthHow much of the way to the curve's own height the ground is moved, 0…1.
public float DepthHow far below the curve the carriageway sits, in metres.
public static TerrainSplineProfile RoadA road: three metres of carriageway and four of shoulder either side.
public float ReachThe furthest the profile reaches from the curve, in metres.
Methods (2)
public float WeightAt(float offset)How much the profile moves the ground at a signed distance from the curve.
public string? Validate()Why this profile cannot be applied, or if it can.
Used by (4)
- TerrainSplineVixen.Terrain
- TerrainSplineTestsVixen.Terrain.Tests
- TerrainPanelTestsVixen.Editor.App.Tests
- TerrainSplineSettingsVixen.Editor.Terrain