![]() |
Pioneer
|
#include <StarSystemGenerator.h>


Public Member Functions | |
| virtual bool | Apply (Random &rng, RefCountedPtr< Galaxy > galaxy, RefCountedPtr< StarSystem::GeneratorAPI > system, GalaxyGenerator::StarSystemConfig *config) |
| fixed | CalcBodySatelliteShellDensity (Random &rand, SystemBody *primary, fixed &discMin, fixed &discMax) |
| SystemBody * | MakeBodyInOrbitSlice (Random &rand, StarSystem::GeneratorAPI *system, SystemBody *primary, fixed min, fixed max, fixed discMax, fixed discDensity) |
| void | PickPlanetType (SystemBody *sbody, Random &rand) |
Public Member Functions inherited from StarSystemGeneratorStage | |
| virtual | ~StarSystemGeneratorStage () |
| virtual bool | Apply (Random &rng, RefCountedPtr< Galaxy > galaxy, RefCountedPtr< StarSystem::GeneratorAPI > system, GalaxyGenerator::StarSystemConfig *config)=0 |
Public Member Functions inherited from GalaxyGeneratorStage | |
| virtual | ~GalaxyGeneratorStage () |
| virtual void | ToJson (Json &jsonObj, RefCountedPtr< Galaxy > galaxy) |
| virtual void | FromJson (const Json &jsonObj, RefCountedPtr< Galaxy > galaxy) |
Static Public Attributes | |
| static constexpr uint32_t | BODY_SATELLITE_SALT = 0xf5123a90 |
Additional Inherited Members | |
Static Public Member Functions inherited from StarSystemLegacyGeneratorBase | |
| static void | PickAtmosphere (SystemBody *sbody) |
| static void | PickRings (SystemBodyData *sbody, bool forceRings=false) |
Protected Member Functions inherited from StarSystemLegacyGeneratorBase | |
| fixedf< 48 > | CalcHillRadius (SystemBody *sbody) const |
Protected Member Functions inherited from GalaxyGeneratorStage | |
| GalaxyGeneratorStage () | |
| void | AssignToGalaxyGenerator (GalaxyGenerator *galaxyGenerator) |
Protected Attributes inherited from GalaxyGeneratorStage | |
| GalaxyGenerator * | m_galaxyGenerator |
Static Protected Attributes inherited from StarSystemLegacyGeneratorBase | |
| static const fixed | starMetallicities [] |
| static const StarTypeInfo | starTypeInfo [] |
|
virtual |
| fixed StarSystemRandomGenerator::CalcBodySatelliteShellDensity | ( | Random & | rand, |
| SystemBody * | primary, | ||
| fixed & | discMin, | ||
| fixed & | discMax | ||
| ) |

| SystemBody * StarSystemRandomGenerator::MakeBodyInOrbitSlice | ( | Random & | rand, |
| StarSystem::GeneratorAPI * | system, | ||
| SystemBody * | primary, | ||
| fixed | min, | ||
| fixed | max, | ||
| fixed | discMax, | ||
| fixed | discDensity | ||
| ) |

| void StarSystemRandomGenerator::PickPlanetType | ( | SystemBody * | sbody, |
| Random & | rand | ||
| ) |
In this and following functions, we attempt to capture even a fraction of the true majesty of the infinite cosmos.
System generation is based primarily around a mass-based metric, where the total mass of a primary body determines the maximum mass of its individual satellites.
The area of a body's "orbital slice" (between itself and any neighboring bodies) informs the mass of a body to avoid obviously-unnatural configurations with high-mass bodies orbiting so closely as to perturb each others' orbits beyond what Pioneer can simulate.
A series of post-processing factors are applied to this initial maximum mass value to curve the mass factor over the entire Hill Sphere of the parent body. This reduces the incidence of "gas giant spam" and produces more perceptually-realistic arrangements of body types and masses.
Body radius and type is inferred from the mass of the body and applied based on a set of density heuristics (in PickPlanetType), and remaining body parameters are set to complete body generation.

|
staticconstexpr |