#include <W3DBridgeBuffer.h>
Public Types | |
| enum | { MAX_BRIDGE_VERTEX =12000 , MAX_BRIDGE_INDEX =2*MAX_BRIDGE_VERTEX , MAX_BRIDGES =200 } |
Public Member Functions | |
| W3DBridgeBuffer (void) | |
| ~W3DBridgeBuffer (void) | |
| void | clearAllBridges (void) |
| Empties the bridge buffer. | |
| void | drawBridges (CameraClass *camera, Bool wireframe, TextureClass *cloudTexture) |
| Draws the bridges. Uses camera for culling. | |
| void | doFullUpdate (void) |
| void | loadBridges (W3DTerrainLogic *pTerrainLogic, Bool saveGame) |
| Loads the bridges from the map objects list. | |
| void | worldBuilderUpdateBridgeTowers (W3DAssetManager *assetManager, SimpleSceneClass *scene) |
| for the editor and showing visual bridge towers | |
| void | updateCenter (CameraClass *camera, RefRenderObjListIterator *pLightsIterator) |
Protected Member Functions | |
| void | addBridge (Vector3 fromLoc, Vector3 toLoc, AsciiString name, W3DTerrainLogic *pTerrainLogic, Dict *props) |
| Add a bridge at location. Name is the gdf item name. | |
| void | loadBridgesInVertexAndIndexBuffers (RefRenderObjListIterator *pLightsIterator) |
| Fills the index and vertex buffers for drawing. | |
| void | allocateBridgeBuffers (void) |
| Allocates the buffers. | |
| void | cull (CameraClass *camera) |
| Culls the bridges. | |
| void | freeBridgeBuffers (void) |
| Frees the index and vertex buffers. | |
Protected Attributes | |
| DX8VertexBufferClass * | m_vertexBridge |
| Bridge vertex buffer. | |
| DX8IndexBufferClass * | m_indexBridge |
| indices defining a triangles for the bridge drawing. | |
| VertexMaterialClass * | m_vertexMaterial |
| TextureClass * | m_bridgeTexture |
| Bridges texture. | |
| Int | m_curNumBridgeVertices |
| Number of vertices used in m_vertexBridge. | |
| Int | m_curNumBridgeIndices |
| Number of indices used in b_indexBridge;. | |
| W3DBridge | m_bridges [MAX_BRIDGES] |
| The bridge buffer. All bridges are stored here. | |
| Int | m_numBridges |
| Number of bridges in m_bridges. | |
| Bool | m_initialized |
| True if the subsystem initialized. | |
| Bool | m_updateVis |
| True if the camera moved, and we need to recalculate visibility. | |
| Bool | m_anythingChanged |
Friends | |
| class | BaseHeightMapRenderObjClass |
Definition at line 150 of file W3DBridgeBuffer.h.
| anonymous enum |
| Enumerator | |
|---|---|
| MAX_BRIDGE_VERTEX | |
| MAX_BRIDGE_INDEX | |
| MAX_BRIDGES | |
Definition at line 167 of file W3DBridgeBuffer.h.
| W3DBridgeBuffer::W3DBridgeBuffer | ( | void | ) |
Constructor. Sets m_initialized to true if it finds the w3d models it needs for the bridges.
Definition at line 742 of file W3DBridgeBuffer.cpp.
| W3DBridgeBuffer::~W3DBridgeBuffer | ( | void | ) |
Destructor. Releases w3d assets.
Definition at line 731 of file W3DBridgeBuffer.cpp.
|
protected |
Add a bridge at location. Name is the gdf item name.
Adds a bridge. Name is the GDF object name.
Definition at line 1075 of file W3DBridgeBuffer.cpp.
|
protected |
Allocates the buffers.
Allocates the index and vertex buffers.
Definition at line 774 of file W3DBridgeBuffer.cpp.
| void W3DBridgeBuffer::clearAllBridges | ( | void | ) |
|
protected |
Culls the bridges.
Culls the bridges, marking the visible flag. If a bridge changes visibility, it sets m_anythingChanged
Definition at line 671 of file W3DBridgeBuffer.cpp.
|
inline |
Called when the view changes, and sort key needs to be recalculated. Normally sortKey gets calculated when a bridge becomes visible.
Definition at line 163 of file W3DBridgeBuffer.h.
| void W3DBridgeBuffer::drawBridges | ( | CameraClass * | camera, |
| Bool | wireframe, | ||
| TextureClass * | cloudTexture ) |
Draws the bridges. Uses camera for culling.
Draws the bridges.
Definition at line 1116 of file W3DBridgeBuffer.cpp.
|
protected |
Frees the index and vertex buffers.
Frees the index and vertex buffers.
Definition at line 762 of file W3DBridgeBuffer.cpp.
| void W3DBridgeBuffer::loadBridges | ( | W3DTerrainLogic * | pTerrainLogic, |
| Bool | saveGame ) |
Loads the bridges from the map objects list.
loadBridges. When loaded, tell the terrain logic where the bridge is.
Definition at line 814 of file W3DBridgeBuffer.cpp.
|
protected |
Fills the index and vertex buffers for drawing.
Loads the bridges into the vertex buffer for drawing.
Definition at line 690 of file W3DBridgeBuffer.cpp.
| void W3DBridgeBuffer::updateCenter | ( | CameraClass * | camera, |
| RefRenderObjListIterator * | pLightsIterator ) |
Updates the drawing buffer, based on the camera position.
Definition at line 1102 of file W3DBridgeBuffer.cpp.
| void W3DBridgeBuffer::worldBuilderUpdateBridgeTowers | ( | W3DAssetManager * | assetManager, |
| SimpleSceneClass * | scene ) |
for the editor and showing visual bridge towers
loadBridges. When loaded, tell the terrain logic where the bridge is.
Definition at line 982 of file W3DBridgeBuffer.cpp.
|
friend |
Definition at line 152 of file W3DBridgeBuffer.h.
|
protected |
Set to true if visibility changed.
Definition at line 181 of file W3DBridgeBuffer.h.
|
protected |
The bridge buffer. All bridges are stored here.
Definition at line 177 of file W3DBridgeBuffer.h.
|
protected |
Bridges texture.
Definition at line 174 of file W3DBridgeBuffer.h.
|
protected |
Number of indices used in b_indexBridge;.
Definition at line 176 of file W3DBridgeBuffer.h.
|
protected |
Number of vertices used in m_vertexBridge.
Definition at line 175 of file W3DBridgeBuffer.h.
|
protected |
indices defining a triangles for the bridge drawing.
Definition at line 172 of file W3DBridgeBuffer.h.
|
protected |
True if the subsystem initialized.
Definition at line 179 of file W3DBridgeBuffer.h.
|
protected |
Number of bridges in m_bridges.
Definition at line 178 of file W3DBridgeBuffer.h.
|
protected |
True if the camera moved, and we need to recalculate visibility.
Definition at line 180 of file W3DBridgeBuffer.h.
|
protected |
Bridge vertex buffer.
Definition at line 171 of file W3DBridgeBuffer.h.
|
protected |
Definition at line 173 of file W3DBridgeBuffer.h.