#include <W3DTerrainBackground.h>
Public Member Functions | |
| W3DTerrainBackground (void) | |
| ~W3DTerrainBackground (void) | |
| void | drawVisiblePolys (RenderInfoClass &rinfo, Bool disableTextures) |
| Draws the terrain. | |
| void | setFlip (WorldHeightMap *htMap) |
| Sets the flip bit for required vertices. | |
| void | doPartialUpdate (const IRegion2D &partialRange, WorldHeightMap *htMap, Bool doTextures) |
| void | doTesselatedUpdate (const IRegion2D &partialRange, WorldHeightMap *htMap, Bool doTextures) |
| void | allocateTerrainBuffers (WorldHeightMap *htMap, Int xOrigin, Int yOrigin, Int width) |
| Allocates the buffers. | |
| void | updateCenter (CameraClass *camera) |
| void | updateTexture (void) |
| Bool | isCulled (void) |
| Int | getTexMultiplier (void) |
Protected Types | |
| enum | { CULL_STATUS_UNKNOWN , CULL_STATUS_VISIBLE , CULL_STATUS_INVISIBLE } |
| enum | { TEX4X =4 , TEX2X =2 , TEX1X =1 } |
| enum | TDirection { HORIZONTAL , VERTICAL } |
Protected Member Functions | |
| void | freeTerrainBuffers (void) |
| Frees the index and vertex buffers. | |
| void | fillVBRecursive (UnsignedShort *ib, Int xOffset, Int yOffset, Int width, UnsignedShort *ndx, Int &curIndex) |
| void | setFlipRecursive (Int xOffset, Int yOffset, Int width) |
| Bool | advanceLeft (ICoord2D &left, Int xOffset, Int yOffset, Int width) |
| Bool | advanceRight (ICoord2D &left, Int xOffset, Int yOffset, Int width) |
Protected Attributes | |
| enum W3DTerrainBackground:: { ... } | m_cullStatus |
| AABoxClass | m_bounds |
| DX8VertexBufferClass * | m_vertexTerrain |
| Terrain vertex buffer. | |
| Int | m_vertexTerrainSize |
| Num vertices in bib buffer. | |
| DX8IndexBufferClass * | m_indexTerrain |
| indices defining a triangles for the bib drawing. | |
| Int | m_indexTerrainSize |
| indices available in m_indexTerrain. | |
| TerrainTextureClass * | m_terrainTexture |
| Terrain texture. | |
| TerrainTextureClass * | m_terrainTexture2X |
| Terrain texture. | |
| TerrainTextureClass * | m_terrainTexture4X |
| Terrain texture. | |
| enum W3DTerrainBackground:: { ... } | m_texMultiplier |
| Int | m_curNumTerrainVertices |
| Number of vertices used in m_vertexTerrain. | |
| Int | m_curNumTerrainIndices |
| Number of indices used in b_indexTerrain;. | |
| Int | m_xOrigin |
| Int | m_yOrigin |
| Int | m_width |
| WorldHeightMap * | m_map |
| Bool | m_anythingChanged |
| Set to true if visibility or sorting changed. | |
| Bool | m_initialized |
| True if the subsystem initialized. | |
Friends | |
| class | HeightMapRenderObjClass |
Definition at line 79 of file W3DTerrainBackground.h.
|
protected |
| Enumerator | |
|---|---|
| TEX4X | |
| TEX2X | |
| TEX1X | |
Definition at line 107 of file W3DTerrainBackground.h.
|
protected |
| Enumerator | |
|---|---|
| CULL_STATUS_UNKNOWN | |
| CULL_STATUS_VISIBLE | |
| CULL_STATUS_INVISIBLE | |
Definition at line 97 of file W3DTerrainBackground.h.
|
protected |
| Enumerator | |
|---|---|
| HORIZONTAL | |
| VERTICAL | |
Definition at line 120 of file W3DTerrainBackground.h.
| W3DTerrainBackground::W3DTerrainBackground | ( | void | ) |
Constructor. Sets m_initialized to true if it finds the w3d models it needs for the bibs.
Definition at line 619 of file W3DTerrainBackground.cpp.
| W3DTerrainBackground::~W3DTerrainBackground | ( | void | ) |
Destructor. Releases w3d assets.
Definition at line 605 of file W3DTerrainBackground.cpp.
|
protected |
Fills in vertex & index buffers.
Definition at line 240 of file W3DTerrainBackground.cpp.
|
protected |
Fills in vertex & index buffers.
Definition at line 262 of file W3DTerrainBackground.cpp.
| void W3DTerrainBackground::allocateTerrainBuffers | ( | WorldHeightMap * | htMap, |
| Int | xOrigin, | ||
| Int | yOrigin, | ||
| Int | width ) |
Allocates the buffers.
Allocates the index and vertex buffers.
Definition at line 654 of file W3DTerrainBackground.cpp.
| void W3DTerrainBackground::doPartialUpdate | ( | const IRegion2D & | partialRange, |
| WorldHeightMap * | htMap, | ||
| Bool | doTextures ) |
Updates a partial block of vertices from [x0,y0 to x1,y1] The coordinates in partialRange are map cell coordinates, relative to the entire map. The vertex coordinates and texture coordinates, as well as static lighting are updated.
Definition at line 115 of file W3DTerrainBackground.cpp.
| void W3DTerrainBackground::doTesselatedUpdate | ( | const IRegion2D & | partialRange, |
| WorldHeightMap * | htMap, | ||
| Bool | doTextures ) |
Updates a partial block of vertices from [x0,y0 to x1,y1] The coordinates in partialRange are map cell coordinates, relative to the entire map. The vertex coordinates and texture coordinates, as well as static lighting are updated.
Definition at line 472 of file W3DTerrainBackground.cpp.
| void W3DTerrainBackground::drawVisiblePolys | ( | RenderInfoClass & | rinfo, |
| Bool | disableTextures ) |
Draws the terrain.
Definition at line 762 of file W3DTerrainBackground.cpp.
|
protected |
Fills in vertex & index buffers.
Definition at line 284 of file W3DTerrainBackground.cpp.
|
protected |
Frees the index and vertex buffers.
Frees the index and vertex buffers.
Definition at line 638 of file W3DTerrainBackground.cpp.
|
inline |
Definition at line 95 of file W3DTerrainBackground.h.
|
inline |
Definition at line 94 of file W3DTerrainBackground.h.
| void W3DTerrainBackground::setFlip | ( | WorldHeightMap * | htMap | ) |
Sets the flip bit for required vertices.
Loads the terrain into the vertex buffer for drawing.
Definition at line 91 of file W3DTerrainBackground.cpp.
Fills in vertex & index buffers.
Definition at line 421 of file W3DTerrainBackground.cpp.
| void W3DTerrainBackground::updateCenter | ( | CameraClass * | camera | ) |
Updates the culling status.
Definition at line 673 of file W3DTerrainBackground.cpp.
| void W3DTerrainBackground::updateTexture | ( | void | ) |
Updates the culling status.
Definition at line 729 of file W3DTerrainBackground.cpp.
|
friend |
Definition at line 81 of file W3DTerrainBackground.h.
|
protected |
Set to true if visibility or sorting changed.
Definition at line 116 of file W3DTerrainBackground.h.
|
protected |
Definition at line 98 of file W3DTerrainBackground.h.
| enum { ... } W3DTerrainBackground::m_cullStatus |
|
protected |
Number of indices used in b_indexTerrain;.
Definition at line 109 of file W3DTerrainBackground.h.
|
protected |
Number of vertices used in m_vertexTerrain.
Definition at line 108 of file W3DTerrainBackground.h.
|
protected |
indices defining a triangles for the bib drawing.
Definition at line 102 of file W3DTerrainBackground.h.
|
protected |
indices available in m_indexTerrain.
Definition at line 103 of file W3DTerrainBackground.h.
|
protected |
True if the subsystem initialized.
Definition at line 117 of file W3DTerrainBackground.h.
|
protected |
Definition at line 114 of file W3DTerrainBackground.h.
|
protected |
Terrain texture.
Definition at line 104 of file W3DTerrainBackground.h.
|
protected |
Terrain texture.
Definition at line 105 of file W3DTerrainBackground.h.
|
protected |
Terrain texture.
Definition at line 106 of file W3DTerrainBackground.h.
| enum { ... } W3DTerrainBackground::m_texMultiplier |
|
protected |
Terrain vertex buffer.
Definition at line 100 of file W3DTerrainBackground.h.
|
protected |
Num vertices in bib buffer.
Definition at line 101 of file W3DTerrainBackground.h.
|
protected |
Definition at line 113 of file W3DTerrainBackground.h.
|
protected |
Definition at line 111 of file W3DTerrainBackground.h.
|
protected |
Definition at line 112 of file W3DTerrainBackground.h.