Pyrogenesis  trunk
Public Types | Public Member Functions | Private Attributes | List of all members
PathfindTile Struct Reference

Tile data for A* computation. More...

#include <LongPathfinder.h>

Collaboration diagram for PathfindTile:
Collaboration graph
[legend]

Public Types

enum  { STATUS_UNEXPLORED = 0, STATUS_OPEN = 1, STATUS_CLOSED = 2 }
 

Public Member Functions

bool IsUnexplored () const
 
bool IsOpen () const
 
bool IsClosed () const
 
void SetStatusOpen ()
 
void SetStatusClosed ()
 
int GetPredI (int i) const
 
int GetPredJ (int j) const
 
PathCost GetCost () const
 
void SetCost (PathCost cost)
 
u8 GetStatus () const
 
void SetStatus (u8 s)
 
int GetPredDI () const
 
int GetPredDJ () const
 
void SetPred (int pi, int pj, int i, int j)
 

Private Attributes

PathCost g
 
u32 data
 

Detailed Description

Tile data for A* computation.

(We store an array of one of these per terrain tile, so it ought to be optimised for size)

Member Enumeration Documentation

anonymous enum
Enumerator
STATUS_UNEXPLORED 
STATUS_OPEN 
STATUS_CLOSED 

Member Function Documentation

PathCost PathfindTile::GetCost ( ) const
inline
int PathfindTile::GetPredDI ( ) const
inline
int PathfindTile::GetPredDJ ( ) const
inline
int PathfindTile::GetPredI ( int  i) const
inline
int PathfindTile::GetPredJ ( int  j) const
inline
u8 PathfindTile::GetStatus ( ) const
inline
bool PathfindTile::IsClosed ( ) const
inline
bool PathfindTile::IsOpen ( ) const
inline
bool PathfindTile::IsUnexplored ( ) const
inline
void PathfindTile::SetCost ( PathCost  cost)
inline
void PathfindTile::SetPred ( int  pi,
int  pj,
int  i,
int  j 
)
inline
void PathfindTile::SetStatus ( u8  s)
inline
void PathfindTile::SetStatusClosed ( )
inline
void PathfindTile::SetStatusOpen ( )
inline

Member Data Documentation

u32 PathfindTile::data
private
PathCost PathfindTile::g
private

The documentation for this struct was generated from the following file: