Simulator::cPlanet class

Visual representation of a planet (or asteroids).

The information of a planet is stored in the Simulator::cPlanetRecord class, but that class does not hold any visual information. Whenever a planet must be viewed (in the solar system view in Space stage, or when you see planets in the sky while you are in a planet), this cPlanet class is used. You can use the Simulator::cStarManager::RecordToPlanet() method to generate a planet from a planet record.

Base classes

class cSpatialObject
A 3D model in the Simulator.
class cGameData
Base class for most Simulator objects.

Public static variables

static const uint32_t TYPE
static const uint32_t NOUN_ID

Public functions

auto GetTemperatureScore() const -> float
Returns the temperature score of the planet record in the [0, 1] range or 0.5 if there is no planet record.
auto GetEmpire() -> cEmpire*
Returns the empire that controls this planet, if any.
void SetRepresentationMode(PlanetRepresentationMode mode)
Sets and enables the graphical representation of the planet.
auto AddRef() -> int pure virtual
auto Release() -> int pure virtual

Public variables

int mNumSpecializedBehaviorUFOs
Math::Matrix3 field_10C
int field_130
int field_134
int field_138
cPlanetRecordPtr mpPlanetRecord
uint32_t mPlanetKey
uint32_t mStarterWorldID
Math::Vector3 mOrbitedPlanetLastKnownPosition
intrusive_ptr<cSimPlanetLowLOD> mpPlanetSim
PlanetRepresentationMode mGraphicRepresentationMode
string16 mImpostorModel
uint32_t mEffectScript
vector<int> field_170
float mPlanetScale
cSolarHitSpherePtr mpSolarHitSphere
cVisiblePlanetPtr mpVisiblePlanet
bool field_190
cGonzagoTimer mTimeSinceLastColonyPlaced
bool field_1B8
int mPlanetFlags
cPlanetPtr mpParent
uint32_t field_1C4

Function documentation

void Simulator::cPlanet::SetRepresentationMode(PlanetRepresentationMode mode)

Sets and enables the graphical representation of the planet.


Depending on the type, this creates and sets visible the mpSolarHitSphere and the mpVisiblePlanet.