Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
W3DBibBuffer Class Reference

#include <W3DBibBuffer.h>

Public Member Functions

 W3DBibBuffer (void)
 
 ~W3DBibBuffer (void)
 
void addBib (Vector3 corners[4], ObjectID id, Bool highlight)
 Add a bib at location. Name is the w3d model name.
 
void addBibDrawable (Vector3 corners[4], DrawableID id, Bool highlight)
 
void removeBib (ObjectID id)
 Add a bib at location. Name is the w3d model name.
 
void removeBibDrawable (DrawableID id)
 
void clearAllBibs (void)
 Empties the bib buffer.
 
void removeHighlighting (void)
 Removes highlighting.
 
void renderBibs ()
 Draws the bibs.
 

Protected Types

enum  { INITIAL_BIB_VERTEX =256 , INITIAL_BIB_INDEX =384 , MAX_BIBS =1000 }
 

Protected Member Functions

void loadBibsInVertexAndIndexBuffers (void)
 Fills the index and vertex buffers for drawing.
 
void allocateBibBuffers (void)
 Allocates the buffers.
 
void freeBibBuffers (void)
 Frees the index and vertex buffers.
 

Protected Attributes

DX8VertexBufferClassm_vertexBib
 Bib vertex buffer.
 
Int m_vertexBibSize
 Num vertices in bib buffer.
 
DX8IndexBufferClassm_indexBib
 indices defining a triangles for the bib drawing.
 
Int m_indexBibSize
 indices available in m_indexBib.
 
TextureClassm_bibTexture
 Bibs texture.
 
TextureClassm_highlightBibTexture
 Bibs texture.
 
Int m_curNumBibVertices
 Number of vertices used in m_vertexBib.
 
Int m_curNumBibIndices
 Number of indices used in b_indexBib;.
 
Int m_curNumNormalBibIndices
 Number of non-highlighted bib index.
 
Int m_curNumNormalBibVertex
 Number of non-highlighted bib vertex.
 
TBib m_bibs [MAX_BIBS]
 The bib buffer. All bibs are stored here.
 
Int m_numBibs
 Number of bibs in m_bibs.
 
Bool m_anythingChanged
 Set to true if visibility or sorting changed.
 
Bool m_updateAllKeys
 Set to true when the view changes.
 
Bool m_initialized
 True if the subsystem initialized.
 
Bool m_isTerrainPass
 True if the terrain was drawn in this W3D scene render pass.
 

Friends

class BaseHeightMapRenderObjClass
 

Detailed Description

Definition at line 87 of file W3DBibBuffer.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Called when the view changes, and sort key needs to be recalculated. Normally sortKey gets calculated when a bib becomes visible.

Enumerator
INITIAL_BIB_VERTEX 
INITIAL_BIB_INDEX 
MAX_BIBS 

Definition at line 109 of file W3DBibBuffer.h.

Constructor & Destructor Documentation

◆ W3DBibBuffer()

W3DBibBuffer::W3DBibBuffer ( void )

Constructor. Sets m_initialized to true if it finds the w3d models it needs for the bibs.

Definition at line 227 of file W3DBibBuffer.cpp.

◆ ~W3DBibBuffer()

W3DBibBuffer::~W3DBibBuffer ( void )

Destructor. Releases w3d assets.

Definition at line 214 of file W3DBibBuffer.cpp.

Member Function Documentation

◆ addBib()

void W3DBibBuffer::addBib ( Vector3 corners[4],
ObjectID id,
Bool highlight )

Add a bib at location. Name is the w3d model name.

Adds a bib.

Definition at line 311 of file W3DBibBuffer.cpp.

◆ addBibDrawable()

void W3DBibBuffer::addBibDrawable ( Vector3 corners[4],
DrawableID id,
Bool highlight )

Adds a bib.

Definition at line 349 of file W3DBibBuffer.cpp.

◆ allocateBibBuffers()

void W3DBibBuffer::allocateBibBuffers ( void )
protected

Allocates the buffers.

Allocates the index and vertex buffers.

Definition at line 266 of file W3DBibBuffer.cpp.

◆ clearAllBibs()

void W3DBibBuffer::clearAllBibs ( void )

Empties the bib buffer.

Removes all bibs.

Definition at line 279 of file W3DBibBuffer.cpp.

◆ freeBibBuffers()

void W3DBibBuffer::freeBibBuffers ( void )
protected

Frees the index and vertex buffers.

Frees the index and vertex buffers.

Definition at line 255 of file W3DBibBuffer.cpp.

◆ loadBibsInVertexAndIndexBuffers()

void W3DBibBuffer::loadBibsInVertexAndIndexBuffers ( void )
protected

Fills the index and vertex buffers for drawing.

Loads the bibs into the vertex buffer for drawing.

Definition at line 87 of file W3DBibBuffer.cpp.

◆ removeBib()

void W3DBibBuffer::removeBib ( ObjectID id)

Add a bib at location. Name is the w3d model name.

Removes a bib.

Definition at line 387 of file W3DBibBuffer.cpp.

◆ removeBibDrawable()

void W3DBibBuffer::removeBibDrawable ( DrawableID id)

Removes a bib.

Definition at line 405 of file W3DBibBuffer.cpp.

◆ removeHighlighting()

void W3DBibBuffer::removeHighlighting ( void )

Removes highlighting.

Clears highlighting flag.

Definition at line 298 of file W3DBibBuffer.cpp.

◆ renderBibs()

void W3DBibBuffer::renderBibs ( )

Draws the bibs.

Draws the bibs. Uses camera to cull.

Definition at line 424 of file W3DBibBuffer.cpp.

Friends And Related Symbol Documentation

◆ BaseHeightMapRenderObjClass

friend class BaseHeightMapRenderObjClass
friend

Definition at line 89 of file W3DBibBuffer.h.

Member Data Documentation

◆ m_anythingChanged

Bool W3DBibBuffer::m_anythingChanged
protected

Set to true if visibility or sorting changed.

Definition at line 125 of file W3DBibBuffer.h.

◆ m_bibs

TBib W3DBibBuffer::m_bibs[MAX_BIBS]
protected

The bib buffer. All bibs are stored here.

Definition at line 123 of file W3DBibBuffer.h.

◆ m_bibTexture

TextureClass* W3DBibBuffer::m_bibTexture
protected

Bibs texture.

Definition at line 116 of file W3DBibBuffer.h.

◆ m_curNumBibIndices

Int W3DBibBuffer::m_curNumBibIndices
protected

Number of indices used in b_indexBib;.

Definition at line 119 of file W3DBibBuffer.h.

◆ m_curNumBibVertices

Int W3DBibBuffer::m_curNumBibVertices
protected

Number of vertices used in m_vertexBib.

Definition at line 118 of file W3DBibBuffer.h.

◆ m_curNumNormalBibIndices

Int W3DBibBuffer::m_curNumNormalBibIndices
protected

Number of non-highlighted bib index.

Definition at line 120 of file W3DBibBuffer.h.

◆ m_curNumNormalBibVertex

Int W3DBibBuffer::m_curNumNormalBibVertex
protected

Number of non-highlighted bib vertex.

Definition at line 121 of file W3DBibBuffer.h.

◆ m_highlightBibTexture

TextureClass* W3DBibBuffer::m_highlightBibTexture
protected

Bibs texture.

Definition at line 117 of file W3DBibBuffer.h.

◆ m_indexBib

DX8IndexBufferClass* W3DBibBuffer::m_indexBib
protected

indices defining a triangles for the bib drawing.

Definition at line 114 of file W3DBibBuffer.h.

◆ m_indexBibSize

Int W3DBibBuffer::m_indexBibSize
protected

indices available in m_indexBib.

Definition at line 115 of file W3DBibBuffer.h.

◆ m_initialized

Bool W3DBibBuffer::m_initialized
protected

True if the subsystem initialized.

Definition at line 127 of file W3DBibBuffer.h.

◆ m_isTerrainPass

Bool W3DBibBuffer::m_isTerrainPass
protected

True if the terrain was drawn in this W3D scene render pass.

Definition at line 128 of file W3DBibBuffer.h.

◆ m_numBibs

Int W3DBibBuffer::m_numBibs
protected

Number of bibs in m_bibs.

Definition at line 124 of file W3DBibBuffer.h.

◆ m_updateAllKeys

Bool W3DBibBuffer::m_updateAllKeys
protected

Set to true when the view changes.

Definition at line 126 of file W3DBibBuffer.h.

◆ m_vertexBib

DX8VertexBufferClass* W3DBibBuffer::m_vertexBib
protected

Bib vertex buffer.

Definition at line 112 of file W3DBibBuffer.h.

◆ m_vertexBibSize

Int W3DBibBuffer::m_vertexBibSize
protected

Num vertices in bib buffer.

Definition at line 113 of file W3DBibBuffer.h.


The documentation for this class was generated from the following files: