Gravity.cginc regenerated from the band template; orbit and fixture tests read the new law
Gravity.cginc is GravityShader.Source() output. OrbitsFromFieldTests spell periods from GravityField.Pull composed as the law (binary members feel the partner's pull at the chord, the outer body feels c(total mass)). Fixtures whose bodies carried mass 0 under constant curves (WellFixture, the mining scenes) now carry a mass: the tree conserves mass. DrawnPoseTests' rails use the Plummer pull. Builds; not yet run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
131895740d
commit
1068eca331
5 changed files with 122 additions and 53 deletions
|
|
@ -2,7 +2,7 @@ using CultMath;
|
|||
using GameCult.Caching;
|
||||
|
||||
// The one fixture that gives a test zone a slope: a body on a parentless orbit (the origin unless `at` says otherwise; call again for more bodies), with the
|
||||
// curves a body needs. Gravity is the sum of body wells (GravityField), so a test that wants ground to slide on
|
||||
// curves a body needs. Gravity is the zone's WellTree over its bodies' masses, so a body carries a mass (any: the constant curves ignore it), and a test that wants ground to slide on
|
||||
// digs it here and nowhere else. `strength` is the well's c (u^2/s^2) and `coreRadius` its softened core in u, which is
|
||||
// the Roche limit curve (the one curve of a body's core).
|
||||
internal static class WellFixture
|
||||
|
|
@ -13,7 +13,7 @@ internal static class WellFixture
|
|||
settings.WellStrength = new ExponentialCurve { Constant = strength };
|
||||
settings.RocheLimit = new ExponentialCurve { Constant = coreRadius };
|
||||
var orbit = cache.Upsert(new OrbitData { FixedPosition = at }).Key;
|
||||
var body = cache.Upsert(new PlanetData { Name = $"Well {at.x},{at.y}", Orbit = new CultRecordRef<OrbitData>(orbit) }).Key;
|
||||
var body = cache.Upsert(new PlanetData { Name = $"Well {at.x},{at.y}", Orbit = new CultRecordRef<OrbitData>(orbit), Mass = 1f }).Key;
|
||||
pack.Orbits.Add(new CultRecordRef<OrbitData>(orbit));
|
||||
pack.Planets.Add(new CultRecordRef<BodyData>(body));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue