Spore ModAPI  2.4.0
API for creating C++ mods for Spore
Public Member Functions | Static Public Member Functions | List of all members
Simulator::cPlanetModel Class Reference

#include <PlanetModel.h>

Inheritance diagram for Simulator::cPlanetModel:
Simulator::cStrategy Simulator::ISimulatorStrategy IVirtual

Public Member Functions

bool IsInWater (const Vector3 &position)
 Returns true if the given position is above or inside the water mass in the planet. More...
 
cCityGetNearestCity (const Vector3 &position)
 
Vector3 ToSurface (const Vector3 &position)
 Returns the position in the surface of the planet that is aligned with the center of the planet and the given position. More...
 
float GetHeightAt (const Vector3 &position)
 
float GetGravity () const
 Returns the gravity acceleration used. More...
 
Vector4 GetOrientation (const Vector3 &position, const Vector3 &direction) const
 
- Public Member Functions inherited from Simulator::ISimulatorStrategy
virtual int AddRef ()=0
 
virtual int Release ()=0
 
virtual void Initialize ()=0
 
virtual void Dispose ()=0
 
virtual const char * GetName ()=0
 
virtual void OnModeExited (uint32_t previousModeID, uint32_t newModeID)=0
 
virtual void OnModeEntered (uint32_t previousModeID, uint32_t newModeID)=0
 
virtual int func1Ch ()=0
 
virtual int func20h ()=0
 
virtual bool func24h ()=0
 
virtual bool Write (void *)=0
 
virtual bool Read (void *)=0
 
virtual void func30h (int)=0
 
virtual bool func34h (int)=0
 
virtual void Update (int deltaTime, int deltaGameTime)=0
 
virtual void PostUpdate (int deltaTime, int deltaGameTime)=0
 
virtual void func40h (int)=0
 
virtual void func44h (int)=0
 
virtual void func48h ()=0
 
virtual void func4Ch ()=0
 
- Public Member Functions inherited from IVirtual
virtual ~IVirtual ()
 

Static Public Member Functions

static cPlanetModelGet ()
 

Additional Inherited Members

- Protected Attributes inherited from Simulator::cStrategy
int mnRefCount
 
int field_C
 
int field_10
 
int field_14
 
int field_18
 

Member Function Documentation

◆ Get()

static cPlanetModel* Simulator::cPlanetModel::Get ( )
static

◆ GetGravity()

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

◆ GetHeightAt()

float Simulator::cPlanetModel::GetHeightAt ( const Vector3 position)

◆ GetNearestCity()

cCity* Simulator::cPlanetModel::GetNearestCity ( const Vector3 position)

◆ GetOrientation()

Vector4 Simulator::cPlanetModel::GetOrientation ( const Vector3 position,
const Vector3 direction 
) const

◆ IsInWater()

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)

◆ ToSurface()

Vector3 Simulator::cPlanetModel::ToSurface ( const Vector3 position)

Returns the position in the surface of the planet that is aligned with the center of the planet and the given position.


The documentation for this class was generated from the following file: