Terrain::cTerrainSphere class

Base classes

class ITerrain
class Graphics::ILayer
This interfaces defines a layer that is rendered every game loop, by callings its ILayer::DrawLayer() method.
class App::IMessageListener
An interface that can receive messages sent through the app.
class Graphics::IAmbientOccluder
class Resource::ResourceObject
A type of object that is used as a resource.

Public types

struct TerrainModification
class TextureContainer

Public static functions

static auto Create() -> cTerrainSphere*

Constructors, destructors, conversion operators

ASSERT_SIZE(TextureContainer, 0x44)
ASSERT_SIZE(TerrainModification, 0xAC)

Public functions

auto Generate(int* unused0 = nullptr, int* unused1 = nullptr, bool = false, bool generateSingleStep = false, float generateTimeLimit = 10.0f) -> void
auto PrepareShaderData() -> void
Updates the fields in the class related with shader data, such as mTerrainState
auto RenderTerrainLand(Graphics::RenderStatistics& stats, int flags) -> void
auto RenderTerrainSeabedAsLand(App::cViewer* pViewer, Graphics::RenderStatistics& stats) -> void
auto RenderTerrainWater(Graphics::RenderStatistics& stats, int flags) -> void
auto RenderTerrainDecals(Graphics::RenderStatistics& stats, int flags) -> void
auto RenderTerrainRibbons(Graphics::RenderStatistics& stats, int flags) -> void
auto RenderTerrainAtmosphere(Graphics::RenderStatistics& stats, int flags) -> void
auto MainRenderPass(App::cViewer** ppViewer, Graphics::RenderStatistics& stats, int flags) -> void
Called on the Graphics::RenderLayers::Terrain layer, calls all the RenderTerrainLand() etc methods.
auto RenderWaterReflectionAndRefraction() -> void
This is called on the Graphics::RenderLayers::TerrainRTT layer, before the planet itself is rendered; this function renders the water reflection and refraction textures that are later used in rendering water.
auto RenderWaterRefraction() -> void
Renders the water refraction texture, called by RenderWaterReflectionAndRefraction()
auto RenderWaterReflection() -> void
Renders the water reflection texture, called by RenderWaterReflectionAndRefraction()
auto GetQuadNormalMap(int quadIndex) -> RenderWare::Raster*
auto GetQuadHeightMap(int quadIndex) -> RenderWare::Raster*
auto GetQuadControlMap(int quadIndex) -> RenderWare::Raster*
auto GetSimDataRTT(int quadIndex) -> RenderWare::Raster*
Returns the SimDataRTT texture for the specified terrain quad.
auto CreateRTTs() -> void
Creates some of the render target textures used by planets: the 'SimData' textures, 'ColorMap', scatter, and reflection.

Public variables

int field_24
PropertyListPtr mpPropList
cTerrainMapSetPtr mpTerrainMapSet
TextureContainer field_30
TextureContainer field_74
TextureContainer field_B8
TextureContainer* mpLoader
ITerrain::OnLoadFinish_t mOnLoadFinish
void* mOnLoadFinishObject
bool mTerrainGenerateSingleStep
float mTerrainGenerateTimeLimit
bool field_110
bool field_111
int field_114
cTerrainSphereQuad* mFullResQuads
cTerrainSphereQuad* mLowResQuads
TexturePtr mTerrainNormalMaps
TexturePtr mTerrainHeightMaps
TexturePtr mTerrainControlMaps
eastl::vector<cTerrainSphereRenderingChunk> mLandRenderingChunks
The terrain land quads that have to be rendered.
eastl::vector<int> field_1A4
eastl::vector<int> field_1B8
uint32_t mSeed
int field_1D0
int mPlanetLODChunkRes
float mPlanetUnderwaterCullRadius
float mPlanetUnderwaterLargeCullRadius
float mPlanetUnderwaterCullRadiusMultiplier
float field_1E4
bool field_1E8
float field_1EC
float field_1F0
float field_1F4
float field_1F8
float field_1FC
float field_200
float field_204
float field_208
cTerrainStateMgr* mpTerrainStateMgr
cWeatherManagerPtr mpWeatherManager
int field_214
eastl::vector<int> field_218
eastl::vector<int> field_22C
eastl::vector<int> field_240
eastl::vector<int> field_254
eastl::vector<int> field_268
eastl::vector<int> field_27C
eastl::vector<int> field_290
eastl::vector<int> field_2A4
eastl::vector<int> field_2B8
eastl::vector<int> field_2CC
eastl::vector<int> field_2E0
eastl::vector<int> field_2F4
TexturePtr field_308
Math::Vector4 mCameraPos
Math::Vector4 mCameraDir
Math::Vector4 mSunDir
bool field_33C
bool field_33D
int field_340
int field_344
bool field_348
float mMungeHeightMapScale
float mMungeWindMapScale
float mMungeTempMapScale
float mMungeLatMapScale
float mMungeAlphaNoiseStrength
float field_360
float field_364
int8_t field_368
int field_36C
bool field_370
char padding_374
Math::Vector4 field_494
bool field_4F4
bool field_4F5
TerrainState mTerrainState
Math::Vector4 mTramp
Math::Vector4 field_6B8
Math::Vector4 field_6C8
Math::Vector4 field_6D8
eastl::vector<int> field_758
bool mAssetsLoaded
eastl::vector<TerrainModification> mModelFootprints
eastl::vector<TerrainModification> mModelNeedRelevel
eastl::vector<TerrainModification> mPlayerEffects
int mNumModels
eastl::vector<ResourceKey> mModelKeys
eastl::vector<Transform> mModelTransforms
eastl::vector<ModelPtr> mModels
eastl::vector<IVisualEffectPtr> mAmbientEffects
eastl::vector<IVisualEffectPtr> mAmbientSoundEffects
int mPlayerModCount
int field_818
int field_81C
char padding_820
bool field_880
int field_884
int field_888
int field_88C
int field_890
int field_894
int field_898
int field_89C
void* mpImpostorJob
int field_8A4
int field_8A8
bool mAllowUnderwaterObjects
eastl::vector<eastl::pair<IModelWorldPtr, int>> mUnderwaterModelWorlds
eastl::vector<eastl::pair<IAnimWorldPtr, int>> mUnderwaterAnimWorlds
IEffectsWorldPtr mpUnderWaterEffectWorld
int field_8DC
int field_8E0
App::cViewer* mpTerrainViewer
Transform field_8E8
int field_920
void* mpDecalManager
void* mpTerrainDraw
Graphics::cFrustumCull mTerrainFrustum
float field_A1C
float field_A20
float field_A24
float field_A28
float field_A2C
float field_A30
float field_A34
Math::ColorRGBA field_A38
int field_A48
void* mpQuadBuffersPool

Function documentation

void Terrain::cTerrainSphere::MainRenderPass(App::cViewer** ppViewer, Graphics::RenderStatistics& stats, int flags)

Called on the Graphics::RenderLayers::Terrain layer, calls all the RenderTerrainLand() etc methods.

Parameters
ppViewer
stats
flags

void Terrain::cTerrainSphere::RenderWaterReflectionAndRefraction()

This is called on the Graphics::RenderLayers::TerrainRTT layer, before the planet itself is rendered; this function renders the water reflection and refraction textures that are later used in rendering water.

This calls RenderWaterRefraction() and RenderWaterReflection()

RenderWare::Raster* Terrain::cTerrainSphere::GetSimDataRTT(int quadIndex)

Returns the SimDataRTT texture for the specified terrain quad.

Parameters
quadIndex

This map is used to control the color of the planet at each point.

void Terrain::cTerrainSphere::CreateRTTs()

Creates some of the render target textures used by planets: the 'SimData' textures, 'ColorMap', scatter, and reflection.

Source code: cTerrainSphere::CreateRTTs()

Variable documentation

Math::Vector4 Terrain::cTerrainSphere::field_6D8