![]() |
Spore ModAPI
2.4.0
API for creating C++ mods for Spore
|
#include <PlanetModel.h>
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... | |
cCity * | GetNearestCity (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 |
![]() | |
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 |
![]() | |
virtual | ~IVirtual () |
Static Public Member Functions | |
static cPlanetModel * | Get () |
Additional Inherited Members | |
![]() | |
int | mnRefCount |
int | field_C |
int | field_10 |
int | field_14 |
int | field_18 |
|
static |
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
float Simulator::cPlanetModel::GetHeightAt | ( | const Vector3 & | position | ) |
Vector4 Simulator::cPlanetModel::GetOrientation | ( | const Vector3 & | position, |
const Vector3 & | direction | ||
) | const |
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)
Returns the position in the surface of the planet that is aligned with the center of the planet and the given position.