class
cSolarSystemHolds visual information about a solar system in the solar system view, or when inside a planet.
In Space Stage, when inside a solar system, this class generates all what you see inside it: it generates the effects of the star/black hole/binary stars/etc, comets, and planets. Stars and comets are represented by the Simulator::
First, the solar system is generated with the cSolarSystem::
Base classes
- class DefaultRefCounted
- The default implementation of a reference counted class.
- class ISimulatorSerializable
Public static variables
Public static functions
-
static auto CreateStarEffect(IVisualEffectPtr& dst,
Swarm::
IEffectsWorld* pEffectWorld, StarType starType) -> void - Instantiates the effect of a star in the solar system view.
Public functions
- auto Load(cStar* pStar) -> void
- Generates all data of the solar system for the given star data.
- auto LoadBinaryStar() -> void
- Called by Load() only in binary systems, generates the two individual star celestial bodies.
- auto LoadAsteroids() -> void
- Called by Load(), generates the asteroids celestial bodies.
- auto GenerateGraphics(bool create) -> void
- Loads/unloads the effects and graphics of this solar system.
- auto GenerateCelestialBodiesEffects(bool create, float scale) -> void
- Loads/unloads the effects for the celestial bodies of this solar system.
- auto AddRef() -> int pure virtual
- auto Release() -> int pure virtual
-
auto Cast(uint32_
t typeID) const -> void* pure virtual
Public variables
- eastl::intrusive_ptr<cStar> mpOwnerStar
- eastl::vector<cPlanetPtr> mPlanets
- eastl::vector<cCelestialBodyPtr> mCelestialBodies
- cCelestialBodyPtr mpStar1
- cCelestialBodyPtr mpStar2
- eastl::vector<ModelPtr> field_40
Function documentation
static void Simulator:: cSolarSystem:: CreateStarEffect(IVisualEffectPtr& dst,
Swarm:: IEffectsWorld* pEffectWorld,
StarType starType)
Instantiates the effect of a star in the solar system view.
Parameters | |
---|---|
dst | The effect must be created into this variable. |
pEffectWorld | Effect world where the effect must be created. |
starType | The kind of star, except binary stars. |
This method does nothing for binary star types, as those are two effects of their respective star types. By default, the effects are:
- StarType::
GalacticCore: 0x3D6EF7B
- StarType::
BlackHole: 0x3D6EEF6
- StarType::
ProtoPlanetary: 0x3D6EF40
- StarType::
StarG: 0x3D6EF4D
- StarType::
StarO: 0x3D6EF59
- StarType::
StarM: 0x3D6EF67
void Simulator:: cSolarSystem:: Load(cStar* pStar)
Generates all data of the solar system for the given star data.
Parameters | |
---|---|
pStar |
By default, this generates mpStar1
(and mpStar2
if it's a binary system), the asteroids, and the planets. This does not any visual effects yet, it only sets up the Simulator classes (cCelestialBody and cPlanet). Source code: cSolarSystem::
void Simulator:: cSolarSystem:: GenerateGraphics(bool create)
Loads/unloads the effects and graphics of this solar system.
Parameters | |
---|---|
create | If true, create and load the graphics, if false, destroy them. |
If create
is true it must generate them, if it is false it must destroy them instead. This method must also create the cSolarHitSphere hit spheres of the celestial bodies.
void Simulator:: cSolarSystem:: GenerateCelestialBodiesEffects(bool create,
float scale)
Loads/unloads the effects for the celestial bodies of this solar system.
Parameters | |
---|---|
create | If true, create and load the graphics, if false, destroy them. |
scale | The scale that will be applied to the effects. |
This method generates the effect of the star (or black hole/planetary disk etc) and comets. By default, these are the effects used:
- Comets:
0x3D6F8D8
- Stars: check CreateStarEffect() Source code: cSolarSystem::
GenerateCelestialBodiesEffects()