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

#include <TerrainLogic.h>

Inherits MemoryPoolObject.

Public Member Functions

 Bridge (BridgeInfo &theInfo, Dict *props, AsciiString bridgeTemplateName)
 
 Bridge (Object *bridgeObj)
 
void setNext (Bridge *pNext)
 
ObjectcreateTower (Coord3D *worldPos, BridgeTowerType towerPos, const ThingTemplate *towerTemplate, Object *bridge)
 
AsciiString getBridgeTemplateName (void)
 return the bridge template name
 
BridgegetNext (void)
 Enumerate all bridges using getNext;.
 
Real getBridgeHeight (const Coord3D *pLoc, Coord3D *normal)
 Get the height for an object on bridge. Note - assumes object is on bridge. Use isPointOnBridge to check.
 
void getBridgeInfo (class BridgeInfo *pInfo)
 Get the bridges logical info.
 
Bool isPointOnBridge (const Coord3D *pLoc)
 See if the point is on the bridge.
 
DrawablepickBridge (const Vector3 &from, const Vector3 &to, Vector3 *pos)
 
void updateDamageState (void)
 Updates a bridge's damage info.
 
const BridgeInfopeekBridgeInfo (void) const
 
PathfindLayerEnum getLayer (void) const
 
void setLayer (PathfindLayerEnum layer)
 
const Region2DgetBounds (void) const
 
Bool isCellOnEnd (const Region2D *cell)
 
Bool isCellOnSide (const Region2D *cell)
 
Bool isCellEntryPoint (const Region2D *cell)
 
void setBridgeObjectID (ObjectID id)
 
void setTowerObjectID (ObjectID id, BridgeTowerType which)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Protected Attributes

Bridgem_next
 Link for traversing all bridges in the current map.
 
AsciiString m_templateName
 bridge template name
 
BridgeInfo m_bridgeInfo
 
Region2D m_bounds
 
PathfindLayerEnum m_layer
 2d bounds for quick screening.
 

Additional Inherited Members

- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

Definition at line 162 of file TerrainLogic.h.

Constructor & Destructor Documentation

◆ Bridge() [1/2]

Bridge::Bridge ( BridgeInfo & theInfo,
Dict * props,
AsciiString bridgeTemplateName )

Definition at line 220 of file TerrainLogic.cpp.

◆ Bridge() [2/2]

Bridge::Bridge ( Object * bridgeObj)

Definition at line 332 of file TerrainLogic.cpp.

Member Function Documentation

◆ createTower()

Object * Bridge::createTower ( Coord3D * worldPos,
BridgeTowerType towerType,
const ThingTemplate * towerTemplate,
Object * bridge )

Create a tower object for the bridge of the specified type (and therefore position)

Definition at line 129 of file TerrainLogic.cpp.

◆ getBounds()

const Region2D * Bridge::getBounds ( void ) const
inline

Definition at line 203 of file TerrainLogic.h.

◆ getBridgeHeight()

Real Bridge::getBridgeHeight ( const Coord3D * pLoc,
Coord3D * normal )

Get the height for an object on bridge. Note - assumes object is on bridge. Use isPointOnBridge to check.

getHeight - Get the height for an object on bridge..

Definition at line 941 of file TerrainLogic.cpp.

◆ getBridgeInfo()

void Bridge::getBridgeInfo ( class BridgeInfo * pInfo)
inline

Get the bridges logical info.

Definition at line 195 of file TerrainLogic.h.

◆ getBridgeTemplateName()

AsciiString Bridge::getBridgeTemplateName ( void )
inline

return the bridge template name

Definition at line 189 of file TerrainLogic.h.

◆ getLayer()

PathfindLayerEnum Bridge::getLayer ( void ) const
inline

Definition at line 201 of file TerrainLogic.h.

◆ getNext()

Bridge * Bridge::getNext ( void )
inline

Enumerate all bridges using getNext;.

Definition at line 191 of file TerrainLogic.h.

◆ isCellEntryPoint()

Bool Bridge::isCellEntryPoint ( const Region2D * cell)

isCellEntryPoint - Is a pathfind cell a spot to move onto the bridge.

Definition at line 774 of file TerrainLogic.cpp.

◆ isCellOnEnd()

Bool Bridge::isCellOnEnd ( const Region2D * cell)

isCellOnEnd - see if cell is on the end of the bridge.

Definition at line 648 of file TerrainLogic.cpp.

◆ isCellOnSide()

Bool Bridge::isCellOnSide ( const Region2D * cell)

isCellOnSide - see if cell is on the end of the bridge.

Definition at line 700 of file TerrainLogic.cpp.

◆ isPointOnBridge()

Bool Bridge::isPointOnBridge ( const Coord3D * pLoc)

See if the point is on the bridge.

isPointOnBridge - see if point is on bridge.

Definition at line 455 of file TerrainLogic.cpp.

◆ peekBridgeInfo()

const BridgeInfo * Bridge::peekBridgeInfo ( void ) const
inline

Definition at line 200 of file TerrainLogic.h.

◆ pickBridge()

Drawable * Bridge::pickBridge ( const Vector3 & from,
const Vector3 & to,
Vector3 * pos )

pickBridge - see if point is on bridge.

Definition at line 844 of file TerrainLogic.cpp.

◆ setBridgeObjectID()

void Bridge::setBridgeObjectID ( ObjectID id)
inline

Definition at line 208 of file TerrainLogic.h.

◆ setLayer()

void Bridge::setLayer ( PathfindLayerEnum layer)
inline

Definition at line 202 of file TerrainLogic.h.

◆ setNext()

void Bridge::setNext ( Bridge * pNext)
inline

Definition at line 183 of file TerrainLogic.h.

◆ setTowerObjectID()

void Bridge::setTowerObjectID ( ObjectID id,
BridgeTowerType which )
inline

Definition at line 209 of file TerrainLogic.h.

◆ updateDamageState()

void Bridge::updateDamageState ( void )

Updates a bridge's damage info.

updateDamageState - Update the damage state.

Definition at line 876 of file TerrainLogic.cpp.

Member Data Documentation

◆ m_bounds

Region2D Bridge::m_bounds
protected

Definition at line 178 of file TerrainLogic.h.

◆ m_bridgeInfo

BridgeInfo Bridge::m_bridgeInfo
protected

Definition at line 177 of file TerrainLogic.h.

◆ m_layer

PathfindLayerEnum Bridge::m_layer
protected

2d bounds for quick screening.

Pathfind layer for this bridge.

Definition at line 179 of file TerrainLogic.h.

◆ m_next

Bridge* Bridge::m_next
protected

Link for traversing all bridges in the current map.

Definition at line 175 of file TerrainLogic.h.

◆ m_templateName

AsciiString Bridge::m_templateName
protected

bridge template name

Definition at line 176 of file TerrainLogic.h.


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