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

#include <W3DCustomEdging.h>

Public Member Functions

 W3DCustomEdging (void)
 
 ~W3DCustomEdging (void)
 
void addEdging (Coord3D location, Real scale, Real angle, AsciiString name, Bool visibleInMirror)
 
void clearAllEdging (void)
 Empties the tree buffer.
 
void drawEdging (WorldHeightMap *pMap, Int minX, Int maxX, Int minY, Int maxY, TextureClass *terrainTexture, TextureClass *cloudTexture, TextureClass *noiseTexture)
 Draws the trees. Uses camera for culling.
 
void doFullUpdate (void)
 

Protected Types

enum  { MAX_EDGE_VERTEX =4*MAX_BLENDS , MAX_EDGE_INDEX =6*MAX_BLENDS }
 

Protected Member Functions

void allocateEdgingBuffers (void)
 Allocates the buffers.
 
void freeEdgingBuffers (void)
 Frees the index and vertex buffers.
 
void loadEdgingsInVertexAndIndexBuffers (WorldHeightMap *pMap, Int minX, Int maxX, Int minY, Int maxY)
 

Protected Attributes

DX8VertexBufferClassm_vertexEdging
 Edging vertex buffer.
 
DX8IndexBufferClassm_indexEdging
 indices defining a triangles for the tree drawing.
 
Int m_curNumEdgingVertices
 Number of vertices used in m_vertexEdging.
 
Int m_curNumEdgingIndices
 Number of indices used in b_indexEdging;.
 
Int m_curEdgingIndexOffset
 First index to draw at. We draw the trees backwards by filling up the index buffer backwards,.
 
Bool m_anythingChanged
 Set to true if visibility or sorting changed.
 
Bool m_initialized
 True if the subsystem initialized.
 

Friends

class HeightMapRenderObjClass
 

Detailed Description

Definition at line 77 of file W3DCustomEdging.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_EDGE_VERTEX 
MAX_EDGE_INDEX 

Definition at line 95 of file W3DCustomEdging.h.

Constructor & Destructor Documentation

◆ W3DCustomEdging()

W3DCustomEdging::W3DCustomEdging ( void )

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

Definition at line 292 of file W3DCustomEdging.cpp.

◆ ~W3DCustomEdging()

W3DCustomEdging::~W3DCustomEdging ( void )

Destructor. Releases w3d assets.

Definition at line 281 of file W3DCustomEdging.cpp.

Member Function Documentation

◆ addEdging()

void W3DCustomEdging::addEdging ( Coord3D location,
Real scale,
Real angle,
AsciiString name,
Bool visibleInMirror )

◆ allocateEdgingBuffers()

void W3DCustomEdging::allocateEdgingBuffers ( void )
protected

Allocates the buffers.

Allocates the index and vertex buffers.

Definition at line 319 of file W3DCustomEdging.cpp.

◆ clearAllEdging()

void W3DCustomEdging::clearAllEdging ( void )

Empties the tree buffer.

Removes all trees.

Definition at line 333 of file W3DCustomEdging.cpp.

◆ doFullUpdate()

void W3DCustomEdging::doFullUpdate ( void )
inline

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

Definition at line 92 of file W3DCustomEdging.h.

◆ drawEdging()

void W3DCustomEdging::drawEdging ( WorldHeightMap * pMap,
Int minX,
Int maxX,
Int minY,
Int maxY,
TextureClass * terrainTexture,
TextureClass * cloudTexture,
TextureClass * noiseTexture )

Draws the trees. Uses camera for culling.

Draws the trees. Uses camera to cull.

Definition at line 348 of file W3DCustomEdging.cpp.

◆ freeEdgingBuffers()

void W3DCustomEdging::freeEdgingBuffers ( void )
protected

Frees the index and vertex buffers.

Frees the index and vertex buffers.

Definition at line 308 of file W3DCustomEdging.cpp.

◆ loadEdgingsInVertexAndIndexBuffers()

void W3DCustomEdging::loadEdgingsInVertexAndIndexBuffers ( WorldHeightMap * pMap,
Int minX,
Int maxX,
Int minY,
Int maxY )
protected

Loads the trees into the vertex buffer for drawing.

Definition at line 115 of file W3DCustomEdging.cpp.

Friends And Related Symbol Documentation

◆ HeightMapRenderObjClass

friend class HeightMapRenderObjClass
friend

Definition at line 79 of file W3DCustomEdging.h.

Member Data Documentation

◆ m_anythingChanged

Bool W3DCustomEdging::m_anythingChanged
protected

Set to true if visibility or sorting changed.

Definition at line 103 of file W3DCustomEdging.h.

◆ m_curEdgingIndexOffset

Int W3DCustomEdging::m_curEdgingIndexOffset
protected

First index to draw at. We draw the trees backwards by filling up the index buffer backwards,.

Definition at line 101 of file W3DCustomEdging.h.

◆ m_curNumEdgingIndices

Int W3DCustomEdging::m_curNumEdgingIndices
protected

Number of indices used in b_indexEdging;.

Definition at line 100 of file W3DCustomEdging.h.

◆ m_curNumEdgingVertices

Int W3DCustomEdging::m_curNumEdgingVertices
protected

Number of vertices used in m_vertexEdging.

Definition at line 99 of file W3DCustomEdging.h.

◆ m_indexEdging

DX8IndexBufferClass* W3DCustomEdging::m_indexEdging
protected

indices defining a triangles for the tree drawing.

Definition at line 98 of file W3DCustomEdging.h.

◆ m_initialized

Bool W3DCustomEdging::m_initialized
protected

True if the subsystem initialized.

Definition at line 104 of file W3DCustomEdging.h.

◆ m_vertexEdging

DX8VertexBufferClass* W3DCustomEdging::m_vertexEdging
protected

Edging vertex buffer.

Definition at line 97 of file W3DCustomEdging.h.


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