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

#include <AIPathfind.h>

Public Member Functions

 PathfindLayer ()
 
 ~PathfindLayer ()
 
void reset (void)
 
Bool init (Bridge *theBridge, PathfindLayerEnum layer)
 
void allocateCells (const IRegion2D *extent)
 
void allocateCellsForWallLayer (const IRegion2D *extent, ObjectID *wallPieces, Int numPieces)
 
void classifyCells ()
 
void classifyWallCells (ObjectID *wallPieces, Int numPieces)
 
Bool setDestroyed (Bool destroyed)
 
Bool isUnused (void)
 
Bool isDestroyed (void)
 
PathfindCellgetCell (Int x, Int y)
 
Int getZone (void)
 
void setZone (Int zone)
 
void applyZone (void)
 
void getStartCellIndex (ICoord2D *start)
 
void getEndCellIndex (ICoord2D *end)
 
ObjectID getBridgeID (void)
 
Bool connectsZones (PathfindZoneManager *zm, const LocomotorSet &locomotorSet, Int zone1, Int zone2)
 
Bool isPointOnWall (ObjectID *wallPieces, Int numPieces, const Coord3D *pt)
 

Protected Member Functions

void classifyLayerMapCell (Int i, Int j, PathfindCell *cell, Bridge *theBridge)
 
void classifyWallMapCell (Int i, Int j, PathfindCell *cell, ObjectID *wallPieces, Int numPieces)
 

Detailed Description

This class represents a bridge in the map. This is effectively a sub-rectangle of the big pathfind map.

Definition at line 387 of file AIPathfind.h.

Constructor & Destructor Documentation

◆ PathfindLayer()

PathfindLayer::PathfindLayer ( )

Definition at line 3198 of file AIPathfind.cpp.

◆ ~PathfindLayer()

PathfindLayer::~PathfindLayer ( )

Definition at line 3215 of file AIPathfind.cpp.

Member Function Documentation

◆ allocateCells()

void PathfindLayer::allocateCells ( const IRegion2D * extent)

Allocates the pathfind cells for the bridge layer.

Definition at line 3371 of file AIPathfind.cpp.

◆ allocateCellsForWallLayer()

void PathfindLayer::allocateCellsForWallLayer ( const IRegion2D * extent,
ObjectID * wallPieces,
Int numPieces )

Allocates the pathfind cells for the wall bridge layer.

Definition at line 3410 of file AIPathfind.cpp.

◆ applyZone()

void PathfindLayer::applyZone ( void )

Copies m_zone into the zone for all the member cells.

Definition at line 3626 of file AIPathfind.cpp.

◆ classifyCells()

void PathfindLayer::classifyCells ( )

Classifies the pathfind cells for the bridge layer.

Definition at line 3499 of file AIPathfind.cpp.

◆ classifyLayerMapCell()

void PathfindLayer::classifyLayerMapCell ( Int i,
Int j,
PathfindCell * cell,
Bridge * theBridge )
protected

Classify the given map cell as clear, or not, etc.

Definition at line 3671 of file AIPathfind.cpp.

◆ classifyWallCells()

void PathfindLayer::classifyWallCells ( ObjectID * wallPieces,
Int numPieces )

Classifies the pathfind cells for the wall bridge layer.

Definition at line 3550 of file AIPathfind.cpp.

◆ classifyWallMapCell()

void PathfindLayer::classifyWallMapCell ( Int i,
Int j,
PathfindCell * cell,
ObjectID * wallPieces,
Int numPieces )
protected

Classify the given map cell as clear, or not, etc.

Definition at line 3784 of file AIPathfind.cpp.

◆ connectsZones()

Bool PathfindLayer::connectsZones ( PathfindZoneManager * zm,
const LocomotorSet & locoSet,
Int zone1,
Int zone2 )

Checks to see if a broken bridge connects 2 zones.

Definition at line 3468 of file AIPathfind.cpp.

◆ getBridgeID()

ObjectID PathfindLayer::getBridgeID ( void )

Return the bridge's object id.

Definition at line 3641 of file AIPathfind.cpp.

◆ getCell()

PathfindCell * PathfindLayer::getCell ( Int x,
Int y )

Return the cell at the index location.

Definition at line 3649 of file AIPathfind.cpp.

◆ getEndCellIndex()

void PathfindLayer::getEndCellIndex ( ICoord2D * end)
inline

Definition at line 407 of file AIPathfind.h.

◆ getStartCellIndex()

void PathfindLayer::getStartCellIndex ( ICoord2D * start)
inline

Definition at line 406 of file AIPathfind.h.

◆ getZone()

Int PathfindLayer::getZone ( void )
inline

Definition at line 403 of file AIPathfind.h.

◆ init()

Bool PathfindLayer::init ( Bridge * theBridge,
PathfindLayerEnum layer )

Draws debug cell info. Sets the bridge & layer number for a layer.

Definition at line 3359 of file AIPathfind.cpp.

◆ isDestroyed()

Bool PathfindLayer::isDestroyed ( void )
inline

Definition at line 401 of file AIPathfind.h.

◆ isPointOnWall()

Bool PathfindLayer::isPointOnWall ( ObjectID * wallPieces,
Int numPieces,
const Coord3D * pt )

Definition at line 3752 of file AIPathfind.cpp.

◆ isUnused()

Bool PathfindLayer::isUnused ( void )

Returns true if the layer is avaialble for use.

Definition at line 3255 of file AIPathfind.cpp.

◆ reset()

void PathfindLayer::reset ( void )

Returns true if the layer is avaialble for use.

Definition at line 3223 of file AIPathfind.cpp.

◆ setDestroyed()

Bool PathfindLayer::setDestroyed ( Bool destroyed)

Relassifies the pathfind cells for the destroyed bridge layer.

Definition at line 3613 of file AIPathfind.cpp.

◆ setZone()

void PathfindLayer::setZone ( Int zone)
inline

Definition at line 404 of file AIPathfind.h.


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