cTerrainSphereQuad class
Public functions
-
auto Initialize(cTerrainSphere* pSphere,
int,
int index,
const Math::
Vector2& coord0, const Math:: Vector2& coord1, int) -> void -
auto LoadTerrainTransform(App::
cViewer* pViewer) -> void - Loads the
mTerrainTransformfield into the shader dataterrainTransform, it also loads the shader datapcaTexture. -
auto Draw(RenderWare::
VertexBuffer* pVertices, RenderWare:: IndexBuffer* pIndices, int startIndex, int indicesCount) -> void - Draws the sphere quad mesh, this does not change any materials.
-
auto RenderLand(App::
cViewer* pViewer, Graphics:: RenderStatistics& stats) -> void - Called by Terrain::
cTerrainSphere:: RenderTerrainLand(). -
auto RenderSeabedAsLand(App::
cViewer* pViewer, Graphics:: RenderStatistics& stats) -> void - Called by Terrain::
cTerrainSphere:: RenderTerrainSeabedAsLand(). -
auto RenderWater(App::
cViewer* pViewer, Graphics:: RenderStatistics& stats, TerrainMaterialIndex material, int flags) -> void - Called by Terrain::
cTerrainSphere:: RenderTerrainWater(). -
auto RenderAtmosphere(App::
cViewer* pViewer, Graphics:: RenderStatistics& stats) -> void - Called by Terrain::
cTerrainSphere:: RenderTerrainAtmosphere(). -
auto RenderDecals(App::
cViewer* pViewer, Graphics:: RenderStatistics& stats) -> void - Called by Terrain::
cTerrainSphere:: RenderTerrainDecals(). - auto UpdateBuffers() -> void
- Recalculates the geometry of the terrain quad only if needed, calling UpdateVertexBuffer() and UpdateIndexBuffer accordingly.
- auto UpdateVertexBuffer() -> void
- Recalculates the vertex buffer of the terrain quad, and sets
mMustUpdateVertexBufferto false. - auto UpdateIndexBuffer() -> void
- Recalculates the index buffer of the terrain quad, and sets
mMustUpdateIndexBufferto false.
Public variables
- cTerrainSphere* mpSphere
- int field_4
- int field_8
- int field_C
- int field_10
- int field_14
- int mPlanetLODChunkRes
- int mIndex
- Index of sphere quad, from 0 to 5.
-
Math::
Vector2 field_20 -
Math::
Vector2 field_28 - float field_30
-
Math::
Vector3 field_34 - char padding_40
- float field_64
- float field_68
- bool mIsLowRes
-
Math::
BoundingBox mChunkBoundingBox - float field_88
- float field_8C
- bool mMustUpdateVertexBuffer
- bool mMustUpdateIndexBuffer
- TerrainQuadMesh* mpMesh
- int mIndicesCount
- int mWaterIndicesCount
- int mWaterIndicesStart
- TerrainTransform mTerrainTransform
- eastl::vector<int> field_154
- int field_168
- int field_16C
- int field_170
- void* mAboveBelowMap
- int field_178
-
Math::
Vector2 field_17C -
Math::
Vector2 field_184 - eastl::vector<int> field_18C
- eastl::vector<int> field_1A0
- int field_1B4
Function documentation
void Terrain:: cTerrainSphereQuad:: LoadTerrainTransform(App:: cViewer* pViewer)
Loads the mTerrainTransform field into the shader data terrainTransform, it also loads the shader data pcaTexture.
| Parameters | |
|---|---|
| pViewer | |
void Terrain:: cTerrainSphereQuad:: Draw(RenderWare:: VertexBuffer* pVertices,
RenderWare:: IndexBuffer* pIndices,
int startIndex,
int indicesCount)
Draws the sphere quad mesh, this does not change any materials.
| Parameters | |
|---|---|
| pVertices | |
| pIndices | |
| startIndex | |
| indicesCount | |
void Terrain:: cTerrainSphereQuad:: RenderLand(App:: cViewer* pViewer,
Graphics:: RenderStatistics& stats)
Called by Terrain::
| Parameters | |
|---|---|
| pViewer | Camera and viewport configuration |
| stats | Structure used to write rendering statistics |
Source code: cTerrainSphereQuad::
void Terrain:: cTerrainSphereQuad:: RenderSeabedAsLand(App:: cViewer* pViewer,
Graphics:: RenderStatistics& stats)
Called by Terrain::
| Parameters | |
|---|---|
| pViewer | Camera and viewport configuration |
| stats | Structure used to write rendering statistics |
Source code: cTerrainSphereQuad::
void Terrain:: cTerrainSphereQuad:: RenderWater(App:: cViewer* pViewer,
Graphics:: RenderStatistics& stats,
TerrainMaterialIndex material,
int flags)
Called by Terrain::
| Parameters | |
|---|---|
| pViewer | Camera and viewport configuration |
| stats | Structure used to write rendering statistics |
| material | Material that must be used to render the water (e.g. ice, lava, water, etc) |
| flags | Additional rendering flags, not used. |
Source code: cTerrainSphereQuad::
void Terrain:: cTerrainSphereQuad:: RenderAtmosphere(App:: cViewer* pViewer,
Graphics:: RenderStatistics& stats)
Called by Terrain::
| Parameters | |
|---|---|
| pViewer | Camera and viewport configuration |
| stats | Structure used to write rendering statistics |
Source code: cTerrainSphereQuad::
void Terrain:: cTerrainSphereQuad:: RenderDecals(App:: cViewer* pViewer,
Graphics:: RenderStatistics& stats)
Called by Terrain::
| Parameters | |
|---|---|
| pViewer | Camera and viewport configuration |
| stats | Structure used to write rendering statistics |