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

#include <AIPathfind.h>

Static Public Member Functions

static void allocateCellInfos (void)
 
static void releaseCellInfos (void)
 
static PathfindCellInfogetACellInfo (PathfindCell *cell, const ICoord2D &pos)
 
static void releaseACellInfo (PathfindCellInfo *theInfo)
 

Protected Attributes

PathfindCellInfom_nextOpen
 
PathfindCellInfom_prevOpen
 for A* "open" list, shared by closed list
 
PathfindCellInfom_pathParent
 "parent" cell from pathfinder
 
PathfindCellm_cell
 Cell this info belongs to currently.
 
UnsignedShort m_totalCost
 
UnsignedShort m_costSoFar
 cost estimates for A* search
 
ICoord2D m_pos
 have to include cell's coordinates, since cells are often accessed via pointer only
 
ObjectID m_goalUnitID
 The objectID of the ground unit whose goal this is.
 
ObjectID m_posUnitID
 The objectID of the ground unit that is occupying this cell.
 
ObjectID m_goalAircraftID
 The objectID of the aircraft whose goal this is.
 
ObjectID m_obstacleID
 the object ID who overlaps this cell
 
UnsignedInt m_isFree:1
 
UnsignedInt m_blockedByAlly:1
 True if this cell is blocked by an allied unit.
 
UnsignedInt m_obstacleIsFence:1
 True if occupied by a fence.
 
UnsignedInt m_obstacleIsTransparent:1
 
UnsignedInt m_open:1
 place for marking this cell as on the open list
 
UnsignedInt m_closed:1
 place for marking this cell as on the closed list
 

Static Protected Attributes

static PathfindCellInfos_infoArray = NULL
 
static PathfindCellInfos_firstFree = NULL
 

Friends

class PathfindCell
 

Detailed Description

Definition at line 207 of file AIPathfind.h.

Member Function Documentation

◆ allocateCellInfos()

void PathfindCellInfo::allocateCellInfos ( void )
static

Allocates a pool of pathfind cell infos.

Definition at line 1110 of file AIPathfind.cpp.

◆ getACellInfo()

PathfindCellInfo * PathfindCellInfo::getACellInfo ( PathfindCell * cell,
const ICoord2D & pos )
static

Gets a pathfindcellinfo.

Definition at line 1146 of file AIPathfind.cpp.

◆ releaseACellInfo()

void PathfindCellInfo::releaseACellInfo ( PathfindCellInfo * theInfo)
static

Returns a pathfindcellinfo.

Definition at line 1177 of file AIPathfind.cpp.

◆ releaseCellInfos()

void PathfindCellInfo::releaseCellInfos ( void )
static

Releases a pool of pathfind cell infos.

Definition at line 1126 of file AIPathfind.cpp.

Friends And Related Symbol Documentation

◆ PathfindCell

friend class PathfindCell
friend

Definition at line 209 of file AIPathfind.h.

Member Data Documentation

◆ m_blockedByAlly

UnsignedInt PathfindCellInfo::m_blockedByAlly
protected

True if this cell is blocked by an allied unit.

Definition at line 239 of file AIPathfind.h.

◆ m_cell

PathfindCell* PathfindCellInfo::m_cell
protected

Cell this info belongs to currently.

Definition at line 225 of file AIPathfind.h.

◆ m_closed

UnsignedInt PathfindCellInfo::m_closed
protected

place for marking this cell as on the closed list

Definition at line 244 of file AIPathfind.h.

◆ m_costSoFar

UnsignedShort PathfindCellInfo::m_costSoFar
protected

cost estimates for A* search

Definition at line 227 of file AIPathfind.h.

◆ m_goalAircraftID

ObjectID PathfindCellInfo::m_goalAircraftID
protected

The objectID of the aircraft whose goal this is.

Definition at line 234 of file AIPathfind.h.

◆ m_goalUnitID

ObjectID PathfindCellInfo::m_goalUnitID
protected

The objectID of the ground unit whose goal this is.

Definition at line 232 of file AIPathfind.h.

◆ m_isFree

UnsignedInt PathfindCellInfo::m_isFree
protected

Definition at line 238 of file AIPathfind.h.

◆ m_nextOpen

PathfindCellInfo* PathfindCellInfo::m_nextOpen
protected

Definition at line 222 of file AIPathfind.h.

◆ m_obstacleID

ObjectID PathfindCellInfo::m_obstacleID
protected

the object ID who overlaps this cell

Definition at line 236 of file AIPathfind.h.

◆ m_obstacleIsFence

UnsignedInt PathfindCellInfo::m_obstacleIsFence
protected

True if occupied by a fence.

Definition at line 240 of file AIPathfind.h.

◆ m_obstacleIsTransparent

UnsignedInt PathfindCellInfo::m_obstacleIsTransparent
protected

True if obstacle is transparent (undefined if obstacleid is invalid)

Definition at line 241 of file AIPathfind.h.

◆ m_open

UnsignedInt PathfindCellInfo::m_open
protected

place for marking this cell as on the open list

Todo
Do we need both mark values in this cell? Can't store a single value and compare it?

Definition at line 243 of file AIPathfind.h.

◆ m_pathParent

PathfindCellInfo* PathfindCellInfo::m_pathParent
protected

"parent" cell from pathfinder

Definition at line 224 of file AIPathfind.h.

◆ m_pos

ICoord2D PathfindCellInfo::m_pos
protected

have to include cell's coordinates, since cells are often accessed via pointer only

Definition at line 230 of file AIPathfind.h.

◆ m_posUnitID

ObjectID PathfindCellInfo::m_posUnitID
protected

The objectID of the ground unit that is occupying this cell.

Definition at line 233 of file AIPathfind.h.

◆ m_prevOpen

PathfindCellInfo * PathfindCellInfo::m_prevOpen
protected

for A* "open" list, shared by closed list

Definition at line 222 of file AIPathfind.h.

◆ m_totalCost

UnsignedShort PathfindCellInfo::m_totalCost
protected

Definition at line 227 of file AIPathfind.h.

◆ s_firstFree

PathfindCellInfo * PathfindCellInfo::s_firstFree = NULL
staticprotected

Definition at line 219 of file AIPathfind.h.

◆ s_infoArray

PathfindCellInfo * PathfindCellInfo::s_infoArray = NULL
staticprotected

Definition at line 218 of file AIPathfind.h.


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