hoa_map::private_map::PathNode Class Reference

A container class for node information in pathfinding. More...

#include <map.h>

Collaboration diagram for hoa_map::private_map::PathNode:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool operator!= (const PathNode &that) const
 Overloaded comparison operator checks that tile.row or tile.col are not equal.
bool operator< (const PathNode &that) const
 Overloaded comparison operator only used for path finding. It compares the two f_scores.
bool operator== (const PathNode &that) const
 Overloaded comparison operator checks that tile.row and tile.col are equal.
 PathNode (int16 r, int16 c)
 PathNode ()

Public Attributes

int16 parent_col
int16 parent_row
int16 col
int16 row
 The coordinates for this node These coordinates correspond to the MapMode::_walkable 2D vector, where each element is a 16x16 pixel space on the map.
Path Scoring Members
int16 f_score
 The total score for this node (f = g + h).
int16 g_score
 The score for this node relative to the source.
int16 h_score
 The Manhattan distance from this node to the destination.

Detailed Description

A container class for node information in pathfinding.

****************************************************************************

This class is used in the MapMode::_FindPath function to find an optimal path from a given source to a destination.

Definition at line 158 of file map.h.


Constructor & Destructor Documentation

hoa_map::private_map::PathNode::PathNode (  )  [inline]

Definition at line 183 of file map.h.

hoa_map::private_map::PathNode::PathNode ( int16  r,
int16  c 
) [inline]

Definition at line 186 of file map.h.


Member Function Documentation

bool hoa_map::private_map::PathNode::operator!= ( const PathNode that  )  const [inline]

Overloaded comparison operator checks that tile.row or tile.col are not equal.

Definition at line 194 of file map.h.

References col, and row.

bool hoa_map::private_map::PathNode::operator< ( const PathNode that  )  const [inline]

Overloaded comparison operator only used for path finding. It compares the two f_scores.

Definition at line 198 of file map.h.

References f_score.

bool hoa_map::private_map::PathNode::operator== ( const PathNode that  )  const [inline]

Overloaded comparison operator checks that tile.row and tile.col are equal.

Definition at line 190 of file map.h.

References col, and row.


Member Data Documentation

int16 hoa_map::private_map::PathNode::col

Definition at line 165 of file map.h.

Referenced by operator!=(), operator==(), and hoa_map::private_map::ActionPathMove::SetDestination().

int16 hoa_map::private_map::PathNode::f_score

The total score for this node (f = g + h).

Definition at line 171 of file map.h.

Referenced by operator<().

int16 hoa_map::private_map::PathNode::g_score

The score for this node relative to the source.

Definition at line 174 of file map.h.

int16 hoa_map::private_map::PathNode::h_score

The Manhattan distance from this node to the destination.

Definition at line 177 of file map.h.

int16 hoa_map::private_map::PathNode::parent_col

Definition at line 181 of file map.h.

int16 hoa_map::private_map::PathNode::parent_row

Definition at line 181 of file map.h.

int16 hoa_map::private_map::PathNode::row

The coordinates for this node These coordinates correspond to the MapMode::_walkable 2D vector, where each element is a 16x16 pixel space on the map.

Definition at line 165 of file map.h.

Referenced by operator!=(), operator==(), and hoa_map::private_map::ActionPathMove::SetDestination().


The documentation for this class was generated from the following file:
Generated on Fri Jul 6 23:14:56 2007 for Hero of Allacrost by  doxygen 1.5.1