Terrain namespace

Everything related with the planet terrain system.

Planets in Spore are spheres, but geometrically they are actually cubes, with the faces deformed outwards to look like a sphere. The main terrain class for a planet is Terrain::cTerrainSphere, which is composed of 6 Terrain::cTerrainSphereQuad faces.

Namespaces

namespace Sphere

Classes

class cTerrainMap
class cTerrainMap16
class cTerrainMap32
class cTerrainMapSet
class cTerrainShaderMgr
class cTerrainSphere
class cTerrainSphereQuad
struct cTerrainSphereRenderingChunk
struct cTerrainStateMgr
class cWeatherManager
class ITerrain
class ITerrainResourceManager
struct TerrainLighting
struct TerrainQuadMesh
struct TerrainState
struct TerrainTransform
class UnkWeatherManager

Enums

enum class TerrainMapIndex: int { HeightMap = 0, NormalMap = 1, ControlMap = 2, ColorMap = 3, JetStreamMap = 4, PressureMap = 5, CloudEmitMap = 6, HeightAboveMap = 7, WindTempMap = 8, FloatTempMap = 9, FilteredMap = 10 }
enum class TerrainMaterialIndex: int { TerrainAbove = 0, TerrainBelow = 1, TerrainWater = 2, TerrainLava = 3, TerrainIce = 4, TerrainAtmosphere = 5, TerrainDecal = 6, TerrainWaterDecal = 7, TerrainAndWaterDecal = 8, TerrainDecalEmissive = 9, TerrainDebug = 10 }

Functions

ASSERT_SIZE(cTerrainMap, 0x10)
ASSERT_SIZE(cTerrainMapSet, 0x5C)
auto Addresses(cTerrainMapSet) -> namespace
ASSERT_SIZE(cTerrainShaderMgr, 0x9C)
auto Addresses(cTerrainShaderMgr) -> namespace
ASSERT_SIZE(cTerrainSphereRenderingChunk, 0x10)
ASSERT_SIZE(cTerrainSphere, 0xA50)
auto Addresses(cTerrainSphere) -> namespace
ASSERT_SIZE(TerrainTransform, 0xB0)
ASSERT_SIZE(cTerrainSphereQuad, 0x1B8)
auto Addresses(cTerrainSphereQuad) -> namespace
ASSERT_SIZE(cTerrainStateMgr, 0xC40)
auto Addresses(cTerrainStateMgr) -> namespace
ASSERT_SIZE(cWeatherManager, 0x1A0)
ASSERT_SIZE(ITerrainResourceManager, 0x68)
auto Addresses(ITerrainResourceManager) -> namespace
auto GetActiveMaterialIndex() -> TerrainMaterialIndex
auto SetActiveMaterialIndex(TerrainMaterialIndex material) -> void
auto GetActiveQuadIndex() -> int
auto SetActiveQuadIndex(int index) -> void
auto IsActiveQuadMaterial(TerrainMaterialIndex material, int quadIndex) -> bool
auto SetActiveQuadMaterial(TerrainMaterialIndex material, int quadIndex) -> void
auto GetAtmosphereIndexBuffer() -> RenderWare::IndexBuffer*
auto CreateRefractionRTTs() -> void
Creates the "TerrainRefractionBuffers", "TerrainRefractionBlur1" and "TerrainRefractionBlur2" render target textures, used for water refraction.
auto DisposeRefractionRTTs() -> void
Disposes the terrain refraction render target textures.
auto GetRefractionBuffersRenderTargetID() -> Graphics::RenderTargetID*
auto GetRefractionBuffersRenderTargetTexture() -> Graphics::Texture*
auto GetRefractionBuffersRenderTarget() -> RenderWare::Raster*
auto SetRefractionBuffersRenderTargetTexture(Graphics::Texture* texture) -> void
auto GetRefractionBlur1RenderTargetID() -> Graphics::RenderTargetID*
auto GetRefractionBlur2RenderTargetID() -> Graphics::RenderTargetID*
auto GetRefractionViewer() -> App::cViewer*
Returns the camera configuration used to render the water refraction textures.
auto CreateReflectionRTTs() -> void
Creates the render target texture used for water reflection.
auto DisposeReflectionRTTs() -> void
auto GetReflectionTexture() -> TexturePtr&
auto GetReflectionViewer() -> App::cViewer*
auto CreateScatterRTTs() -> void
Creates render targets for scatter texture.
auto GetBakeInScatterTexture() -> TexturePtr&
auto GetScatterTexture() -> TexturePtr&
auto GetScatterViewer() -> App::cViewer*
auto GetSimDataRenderTargetTextures() -> Graphics::Texture**
Returns an array of 6 render target textures used for "SimData", which apparently controls planet color for each of the 6 terrain quads.
auto GetSimDataRenderTargetIDs() -> Graphics::RenderTargetID*
Returns an array of 6 render target textures IDs used for "SimData".
auto GetColorMapID() -> Graphics::RenderTargetID*
auto GetColorMap() -> RenderWare::Raster*
auto SetColorMap(RenderWare::Raster* pRaster) -> void
auto GetColorMapViewer() -> App::cViewer*
ASSERT_SIZE(TerrainState, 0x140)
ASSERT_SIZE(TerrainLighting, 0x90)

Enum documentation

enum class Terrain::TerrainMaterialIndex: int

Enumerators
TerrainAbove

Used when rendering land above water level.

TerrainBelow

Used when rendering land below water level (so the seabed land)

TerrainWater

TerrainLava

TerrainIce

TerrainAtmosphere

TerrainDecal

TerrainWaterDecal

TerrainAndWaterDecal

TerrainDecalEmissive

TerrainDebug

Function documentation

void Terrain::CreateRefractionRTTs()

Creates the "TerrainRefractionBuffers", "TerrainRefractionBlur1" and "TerrainRefractionBlur2" render target textures, used for water refraction.

Source code: CreateTerrainRefractionRTTs()

void Terrain::DisposeRefractionRTTs()

Disposes the terrain refraction render target textures.

Source code: DisposeTerrainRefractionRTTs()

App::cViewer* Terrain::GetRefractionViewer()

Returns the camera configuration used to render the water refraction textures.

void Terrain::CreateReflectionRTTs()

Creates the render target texture used for water reflection.

Source code: CreateReflectionRTTs()

void Terrain::CreateScatterRTTs()

Creates render targets for scatter texture.

Source code: CreateScatterRTTs()

Graphics::Texture** Terrain::GetSimDataRenderTargetTextures()

Returns an array of 6 render target textures used for "SimData", which apparently controls planet color for each of the 6 terrain quads.

Graphics::RenderTargetID* Terrain::GetSimDataRenderTargetIDs()

Returns an array of 6 render target textures IDs used for "SimData".