The individual data for a bridge. More...
#include <W3DBridgeBuffer.h>
Public Member Functions | |
| W3DBridge (void) | |
| ~W3DBridge (void) | |
| void | init (Vector3 fromLoc, Vector3 toLoc, AsciiString name) |
| AsciiString | getTemplateName (void) |
| const Vector3 * | getStart (void) const |
| const Vector3 * | getEnd (void) const |
| Bool | load (enum BodyDamageType curDamageState) |
| enum BodyDamageType | getDamageState (void) |
| void | setDamageState (enum BodyDamageType state) |
| void | getIndicesNVertices (UnsignedShort *destination_ib, VertexFormatXYZNDUV1 *destination_vb, Int *curIndexP, Int *curVertexP, RefRenderObjListIterator *pLightsIterator) |
| Bool | cullBridge (CameraClass *camera) |
| Culls the bridges. Returns true if visibility changed. | |
| void | clearBridge (void) |
| Frees all objects associated with a bridge. | |
| Bool | isVisible (void) |
| Bool | isEnabled (void) |
| void | setEnabled (Bool enable) |
| void | renderBridge (Bool wireframe) |
| void | getBridgeInfo (BridgeInfo *pInfo) |
Protected Member Functions | |
| Int | getModelVerticesFixed (VertexFormatXYZNDUV1 *destination_vb, Int curVertex, const Matrix3D &mtx, MeshClass *pMesh, RefRenderObjListIterator *pLightsIterator) |
| Int | getModelIndices (UnsignedShort *destination_ib, Int curIndex, Int vertexOffset, MeshClass *pMesh) |
| Int | getModelVertices (VertexFormatXYZNDUV1 *destination_vb, Int curVertex, Real xOffset, Vector3 &vec, Vector3 &vecNormal, Vector3 &vecZ, Vector3 &offset, const Matrix3D &mtx, MeshClass *pMesh, RefRenderObjListIterator *pLightsIterator) |
Protected Attributes | |
| Vector3 | m_start |
| Drawing location. | |
| Vector3 | m_end |
| Drawing location. | |
| Real | m_scale |
| Width scale. | |
| Real | m_length |
| TBridgeType | m_bridgeType |
| Type of bridge. Currently only 2 supported. | |
| SphereClass | m_bounds |
| Bounding sphere for culling to set the visible flag. | |
| TextureClass * | m_bridgeTexture |
| MeshClass * | m_leftMesh |
| W3D mesh models for the bridges. | |
| Matrix3D | m_leftMtx |
| Transform for the left mesh. | |
| Real | m_minY |
| min y vertex. | |
| Real | m_maxY |
| max y vertex. | |
| Real | m_leftMinX |
| m_leftMesh min x vertex. | |
| Real | m_leftMaxX |
| m_leftMesh max x vertex. | |
| MeshClass * | m_sectionMesh |
| W3D mesh models for the bridges. | |
| Matrix3D | m_sectionMtx |
| Transform for the section mesh. | |
| Real | m_sectionMinX |
| m_sectionMesh min x vertex. | |
| Real | m_sectionMaxX |
| m_sectionMesh max x vertex. | |
| MeshClass * | m_rightMesh |
| W3D mesh models for the bridges. | |
| Matrix3D | m_rightMtx |
| Transform for the right mesh. | |
| Real | m_rightMinX |
| m_rightMesh min x vertex. | |
| Real | m_rightMaxX |
| m_rightMesh max x vertex. | |
| Int | m_firstIndex |
| Starting index buffer. | |
| Int | m_numVertex |
| Number of vertex used. | |
| Int | m_firstVertex |
| First vertex. | |
| Int | m_numPolygons |
| Number of polygons to draw. | |
| Bool | m_visible |
| AsciiString | m_templateName |
| Name of the bridge type. | |
| enum BodyDamageType | m_curDamageState |
| Bool | m_enabled |
The individual data for a bridge.
Definition at line 84 of file W3DBridgeBuffer.h.
| W3DBridge::W3DBridge | ( | void | ) |
Initializes pointers & values.
Definition at line 110 of file W3DBridgeBuffer.cpp.
| W3DBridge::~W3DBridge | ( | void | ) |
Frees objects.
Definition at line 126 of file W3DBridgeBuffer.cpp.
| void W3DBridge::clearBridge | ( | void | ) |
Frees all objects associated with a bridge.
Frees all bridge objects (meshes & texture).
Definition at line 151 of file W3DBridgeBuffer.cpp.
| Bool W3DBridge::cullBridge | ( | CameraClass * | camera | ) |
Culls the bridges. Returns true if visibility changed.
Culls bridge to camera.
Definition at line 165 of file W3DBridgeBuffer.cpp.
| void W3DBridge::getBridgeInfo | ( | BridgeInfo * | pInfo | ) |
Gets the location info for the bridge.
Definition at line 363 of file W3DBridgeBuffer.cpp.
|
inline |
Definition at line 134 of file W3DBridgeBuffer.h.
|
inline |
Definition at line 132 of file W3DBridgeBuffer.h.
| void W3DBridge::getIndicesNVertices | ( | UnsignedShort * | destination_ib, |
| VertexFormatXYZNDUV1 * | destination_vb, | ||
| Int * | curIndexP, | ||
| Int * | curVertexP, | ||
| RefRenderObjListIterator * | pLightsIterator ) |
Gets the index values and vertex values for a bridge.
Definition at line 515 of file W3DBridgeBuffer.cpp.
|
protected |
Gets the index values for a particular mesh section of the bridge.
Definition at line 640 of file W3DBridgeBuffer.cpp.
|
protected |
Gets the vertex values for a section of a bridge.
Definition at line 407 of file W3DBridgeBuffer.cpp.
|
protected |
Gets the vertex values for a section of a fixed bridge.
Definition at line 487 of file W3DBridgeBuffer.cpp.
|
inline |
Definition at line 131 of file W3DBridgeBuffer.h.
|
inline |
Definition at line 130 of file W3DBridgeBuffer.h.
| void W3DBridge::init | ( | Vector3 | fromLoc, |
| Vector3 | toLoc, | ||
| AsciiString | bridgeTemplateName ) |
Inits a bridges location & type so it can be load'ed.
Definition at line 183 of file W3DBridgeBuffer.cpp.
|
inline |
Definition at line 140 of file W3DBridgeBuffer.h.
|
inline |
Definition at line 139 of file W3DBridgeBuffer.h.
| Bool W3DBridge::load | ( | enum BodyDamageType | curDamageState | ) |
Loads a bridge model(if not already loaded) and gets meshes for use at specified location.
Definition at line 197 of file W3DBridgeBuffer.cpp.
| void W3DBridge::renderBridge | ( | Bool | wireframe | ) |
Renders the bride. It is assumed that the shared vertex and index buffers are already set.
Definition at line 137 of file W3DBridgeBuffer.cpp.
|
inline |
Definition at line 135 of file W3DBridgeBuffer.h.
|
inline |
Definition at line 141 of file W3DBridgeBuffer.h.
|
protected |
Bounding sphere for culling to set the visible flag.
Definition at line 92 of file W3DBridgeBuffer.h.
|
protected |
Definition at line 93 of file W3DBridgeBuffer.h.
|
protected |
Type of bridge. Currently only 2 supported.
Definition at line 91 of file W3DBridgeBuffer.h.
|
protected |
Definition at line 114 of file W3DBridgeBuffer.h.
|
protected |
Definition at line 115 of file W3DBridgeBuffer.h.
|
protected |
Drawing location.
Definition at line 88 of file W3DBridgeBuffer.h.
|
protected |
Starting index buffer.
Definition at line 108 of file W3DBridgeBuffer.h.
|
protected |
First vertex.
Definition at line 110 of file W3DBridgeBuffer.h.
|
protected |
m_leftMesh max x vertex.
Definition at line 99 of file W3DBridgeBuffer.h.
|
protected |
W3D mesh models for the bridges.
Definition at line 94 of file W3DBridgeBuffer.h.
|
protected |
m_leftMesh min x vertex.
Definition at line 98 of file W3DBridgeBuffer.h.
|
protected |
Transform for the left mesh.
Definition at line 95 of file W3DBridgeBuffer.h.
|
protected |
Definition at line 90 of file W3DBridgeBuffer.h.
|
protected |
max y vertex.
Definition at line 97 of file W3DBridgeBuffer.h.
|
protected |
min y vertex.
Definition at line 96 of file W3DBridgeBuffer.h.
|
protected |
Number of polygons to draw.
Definition at line 111 of file W3DBridgeBuffer.h.
|
protected |
Number of vertex used.
Definition at line 109 of file W3DBridgeBuffer.h.
|
protected |
m_rightMesh max x vertex.
Definition at line 107 of file W3DBridgeBuffer.h.
|
protected |
W3D mesh models for the bridges.
Definition at line 104 of file W3DBridgeBuffer.h.
|
protected |
m_rightMesh min x vertex.
Definition at line 106 of file W3DBridgeBuffer.h.
|
protected |
Transform for the right mesh.
Definition at line 105 of file W3DBridgeBuffer.h.
|
protected |
Width scale.
Definition at line 89 of file W3DBridgeBuffer.h.
|
protected |
m_sectionMesh max x vertex.
Definition at line 103 of file W3DBridgeBuffer.h.
|
protected |
W3D mesh models for the bridges.
Definition at line 100 of file W3DBridgeBuffer.h.
|
protected |
m_sectionMesh min x vertex.
Definition at line 102 of file W3DBridgeBuffer.h.
|
protected |
Transform for the section mesh.
Definition at line 101 of file W3DBridgeBuffer.h.
|
protected |
Drawing location.
Definition at line 87 of file W3DBridgeBuffer.h.
|
protected |
Name of the bridge type.
Definition at line 113 of file W3DBridgeBuffer.h.
|
protected |
Definition at line 112 of file W3DBridgeBuffer.h.