class
cStarRecordKeeps all the information related to a star and all the elements in its solar system.
This does not represent the star visually (that is the Simulator::
This class represents any element in the galaxy view, so it is also used by binary stars, black holes, proto-planteary disks and the galaxy center.
Star records are uniquely identified with a StarID, which can be retrieved using GetID(). You can get the record from an ID using StarID::
The vector mPlanets
only gets loaded when it is needed, so sometimes it might be empty even if this star has planets. To force it to load, use cStarRecord::
You can create a star record using (cStarRecord*)ClassManager.Create(cStarRecord::CLASS_ID)
Base classes
- class ISimulatorSerializable
- class DefaultRefCounted
- The default implementation of a reference counted class.
Public static variables
Public functions
- auto GetType() const -> StarType
- auto GetTechLevel() const -> TechLevel
- auto GetID() const -> StarID
-
auto GetPlanetRecord(size_
t planetIndex) -> cPlanetRecord* - Returns the planet record information at the given orbit index (0 - planet closest to the sun, 1 - second planet, etc)
- auto GetPlanetRecords() -> eastl::vector<cPlanetRecordPtr>&
- Returns a reference to the planet records of this star, loading them if they are not loaded.
- auto AddRef() -> int pure virtual
- auto Release() -> int pure virtual
-
auto Cast(uint32_
t typeID) const -> void* pure virtual
Public variables
- int mLastObservedTime
- int mSavedGameVersionMajor
- int mSavedGameVersionMinor
- TimeStamp mSavedGameTimeStamp
-
Math::
Vector3 mPosition - StarType mType
- TechLevel mTechLevel
- bool field_50
-
uint32_
t mEmpireID -
uint32_
t mStarterWorldID - int mFlags
- eastl::string16 mName
- StarID mKey
- ResourceKey mCitizenSpeciesKey
- cSpeciesProfile* mpSpeciesProfile
- eastl::vector<cPlanetRecordPtr> mPlanets
- eastl::vector<cPlanetRecordPtr> field_98
- Subset of mPlanets, only those with a specific flag set.
- char mPlanetCount
Function documentation
eastl::vector<cPlanetRecordPtr>& Simulator:: cStarRecord:: GetPlanetRecords()
Returns a reference to the planet records of this star, loading them if they are not loaded.
Returns | A read only vector of the planet records in this star. |
---|
It is preferrable to use this instead of mPlanets
.