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

#include <W3DRoadBuffer.h>

Public Member Functions

 RoadSegment (void)
 
 ~RoadSegment (void)
 
void SetVertexBuffer (VertexFormatXYZDUV1 *vb, Int numVertex)
 
void SetIndexBuffer (UnsignedShort *ib, Int numIndex)
 
void SetRoadSegInfo (TRoadSegInfo *pInfo)
 
void GetRoadSegInfo (TRoadSegInfo *pInfo)
 
const SphereClassgetBounds (void)
 
Int GetNumVertex (void)
 
Int GetNumIndex (void)
 
Int GetVertices (VertexFormatXYZDUV1 *destination_vb, Int numToCopy)
 
Int GetIndices (UnsignedShort *destination_ib, Int numToCopy, Int offset)
 
void updateSegLighting (void)
 

Public Attributes

TRoadPt m_pt1
 Drawing location pt1 to pt2.
 
TRoadPt m_pt2
 Drawing location to.
 
Real m_curveRadius
 Radius if it is a curve.
 
TCorner m_type
 Segment, or curve, or intersection.
 
Real m_scale
 Scale.
 
Real m_widthInTexture
 Width of the road in the texture.
 
Int m_uniqueID
 Road type.
 
Bool m_visible
 

Protected Attributes

Int m_numVertex
 
VertexFormatXYZDUV1m_vb
 
Int m_numIndex
 
UnsignedShortm_ib
 
TRoadSegInfo m_info
 
SphereClass m_bounds
 

Detailed Description

Definition at line 119 of file W3DRoadBuffer.h.

Constructor & Destructor Documentation

◆ RoadSegment()

RoadSegment::RoadSegment ( void )

Nulls index & vertex data.

Definition at line 227 of file W3DRoadBuffer.cpp.

◆ ~RoadSegment()

RoadSegment::~RoadSegment ( void )

Frees index & vertex data.

Definition at line 247 of file W3DRoadBuffer.cpp.

Member Function Documentation

◆ getBounds()

const SphereClass & RoadSegment::getBounds ( void )
inline

Definition at line 145 of file W3DRoadBuffer.h.

◆ GetIndices()

Int RoadSegment::GetIndices ( UnsignedShort * destination_ib,
Int numToCopy,
Int offset )

Copies index entries into destination_ib.

Definition at line 328 of file W3DRoadBuffer.cpp.

◆ GetNumIndex()

Int RoadSegment::GetNumIndex ( void )
inline

Definition at line 147 of file W3DRoadBuffer.h.

◆ GetNumVertex()

Int RoadSegment::GetNumVertex ( void )
inline

Definition at line 146 of file W3DRoadBuffer.h.

◆ GetRoadSegInfo()

void RoadSegment::GetRoadSegInfo ( TRoadSegInfo * pInfo)
inline

Definition at line 144 of file W3DRoadBuffer.h.

◆ GetVertices()

Int RoadSegment::GetVertices ( VertexFormatXYZDUV1 * destination_vb,
Int numToCopy )

Copies vertex entries into destination_vb.

Definition at line 315 of file W3DRoadBuffer.cpp.

◆ SetIndexBuffer()

void RoadSegment::SetIndexBuffer ( UnsignedShort * ib,
Int numIndex )

Allocates & sets the index entries.

Definition at line 296 of file W3DRoadBuffer.cpp.

◆ SetRoadSegInfo()

void RoadSegment::SetRoadSegInfo ( TRoadSegInfo * pInfo)
inline

Definition at line 143 of file W3DRoadBuffer.h.

◆ SetVertexBuffer()

void RoadSegment::SetVertexBuffer ( VertexFormatXYZDUV1 * vb,
Int numVertex )

Allocates & sets the vertex entries.

Definition at line 268 of file W3DRoadBuffer.cpp.

◆ updateSegLighting()

void RoadSegment::updateSegLighting ( void )

Updates the diffuse lighting in the vertex buffer.

Definition at line 344 of file W3DRoadBuffer.cpp.

Member Data Documentation

◆ m_bounds

SphereClass RoadSegment::m_bounds
protected

Definition at line 136 of file W3DRoadBuffer.h.

◆ m_curveRadius

Real RoadSegment::m_curveRadius

Radius if it is a curve.

Definition at line 124 of file W3DRoadBuffer.h.

◆ m_ib

UnsignedShort* RoadSegment::m_ib
protected

Definition at line 134 of file W3DRoadBuffer.h.

◆ m_info

TRoadSegInfo RoadSegment::m_info
protected

Definition at line 135 of file W3DRoadBuffer.h.

◆ m_numIndex

Int RoadSegment::m_numIndex
protected

Definition at line 133 of file W3DRoadBuffer.h.

◆ m_numVertex

Int RoadSegment::m_numVertex
protected

Definition at line 131 of file W3DRoadBuffer.h.

◆ m_pt1

TRoadPt RoadSegment::m_pt1

Drawing location pt1 to pt2.

Definition at line 122 of file W3DRoadBuffer.h.

◆ m_pt2

TRoadPt RoadSegment::m_pt2

Drawing location to.

Definition at line 123 of file W3DRoadBuffer.h.

◆ m_scale

Real RoadSegment::m_scale

Scale.

Definition at line 126 of file W3DRoadBuffer.h.

◆ m_type

TCorner RoadSegment::m_type

Segment, or curve, or intersection.

Definition at line 125 of file W3DRoadBuffer.h.

◆ m_uniqueID

Int RoadSegment::m_uniqueID

Road type.

Definition at line 128 of file W3DRoadBuffer.h.

◆ m_vb

VertexFormatXYZDUV1* RoadSegment::m_vb
protected

Definition at line 132 of file W3DRoadBuffer.h.

◆ m_visible

Bool RoadSegment::m_visible

Definition at line 129 of file W3DRoadBuffer.h.

◆ m_widthInTexture

Real RoadSegment::m_widthInTexture

Width of the road in the texture.

Definition at line 127 of file W3DRoadBuffer.h.


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