Well law: the band term, WellTree owns every term; the old law, per-body sums and Gauss ring law deleted
GravityField is now the band term U(eps, inner, outer) (C4 smoothstep fade, closed form and a series for tau > 1). WellTree is built once per Zone from the orbit tree: node terms, reach, support, the pruned Force/Potential walk and PullAround (rails). Zone.GetHeight/GetForce/PeriodAround delegate to it; WellReference, _wellOn, _strengths, Strength() and DrawAhead.Well are gone; GravityLowering and the shader template take the flat term list; HeightExaggeration halves to 2.0491803. Does not pass yet: Gravity.cginc is not regenerated and PotentialOwnerTests/OrbitsFromFieldTests still spell the old law. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
533b301e49
commit
eeeb6db290
11 changed files with 664 additions and 213 deletions
|
|
@ -51,24 +51,6 @@ public static class DrawAhead
|
|||
return float3(at.x + bearing.x * distance, at.y, at.z + bearing.y * distance);
|
||||
}
|
||||
|
||||
// One well as the shader takes it: its body's rail at the drawn time, with the strength, core and reference the sim's
|
||||
// GetHeight sums with. GravityLowering copies it into the shader's record and decides nothing.
|
||||
public readonly struct DrawnWell
|
||||
{
|
||||
public readonly float2 Position;
|
||||
public readonly float Strength, CoreRadius, Reference;
|
||||
public DrawnWell(float2 position, float strength, float coreRadius, float reference)
|
||||
{
|
||||
Position = position;
|
||||
Strength = strength;
|
||||
CoreRadius = coreRadius;
|
||||
Reference = reference;
|
||||
}
|
||||
}
|
||||
|
||||
public static DrawnWell Well(Zone zone, Planet body, float lead) =>
|
||||
new DrawnWell(Orbit(zone, body.BodyData.Orbit.Key, lead), body.WellStrength, body.RocheLimit, zone.WellReference(body));
|
||||
|
||||
// A free body (a vapour cloud) drawn where the frame falls lead sim seconds after the last step, by the velocity
|
||||
// that step moved it with: the launch velocity and the drift together.
|
||||
public static float2 Position(KinematicBody body, float lead) => body.Position + body.TotalVelocity * lead;
|
||||
|
|
|
|||
Loading…
Reference in a new issue