Simulator::cPlanetModel class

Base classes

class App::IMessageListener
An interface that can receive messages sent through the app.
class cStrategy

Public static functions

static auto Get() -> cPlanetModel*

Public functions

auto IsInWater(const Vector3& position) -> bool
Returns true if the given position is above or inside the water mass in the planet.
auto GetNearestCity(const Vector3& position) -> cCity*
auto ToSurface(const Vector3& position) -> Vector3
Returns the position in the surface of the planet that is aligned with the center of the planet and the given position.
auto GetHeightAt(const Vector3& position) -> float
auto GetGravity() const -> float
Returns the gravity acceleration used.
auto GetOrientation(const Vector3& position, const Vector3& direction) const -> Quaternion

Public variables

int field_1C
ITerrainPtr mpTerrain
Terrain::ITerrain* mpTerrain2
float field_28
ResourceKey mPlanetKey
eastl::string16 field_38
bool mbAddedMessageListeners
void* mpPlanetAStarInfo
void* mpPlanetObstacles
void* mpPlanetRibbonGfx

Function documentation

bool Simulator::cPlanetModel::IsInWater(const Vector3& position)

Returns true if the given position is above or inside the water mass in the planet.

To be exact, this method returns true if the water level is greater than GetHeightAt(position)

float Simulator::cPlanetModel::GetGravity() const

Returns the gravity acceleration used.

If the game is on the scenario mode, the 'scenarioGravity' will used. Otherwise, it returns -9.8