Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
Public Member Functions | Private Attributes | List of all members
Node Class Reference

Creates a Node object Creates a Node object for use with path finding. More...

#include <node.h>

Collaboration diagram for Node:
Collaboration graph

Public Member Functions

 Node (int nodeXIndex, int nodeYIndex)
 
 ~Node ()
 
void setParentIndex (int parentNodeXIndex, int parentNodeYIndex)
 
int getParentXIndex ()
 
int getParentYIndex ()
 
void setStartNode (bool startNode)
 
bool getStartNode ()
 
void setEndNode (bool endNode)
 
bool getEndNode ()
 
void setSafeNode (bool safe)
 
bool getSafeNode ()
 
void setCostNode (int cost)
 
int getCostNode ()
 
void setFScoreNode (int fScore)
 
int getFScoreNode ()
 
int getXIndex ()
 
int getYIndex ()
 
void setListed (bool listed)
 
bool getListed ()
 

Private Attributes

int parentNodeXIndex
 
int parentNodeYIndex
 
int nodeXIndex
 
int nodeYIndex
 
bool startNode
 
bool endNode
 
bool safe
 
int cost
 
int fScore
 
bool listed
 

Detailed Description

Creates a Node object Creates a Node object for use with path finding.

Constructor & Destructor Documentation

Node::Node ( int  nodeXIndex,
int  nodeYIndex 
)

Constructs a Node object

Parameters
intThe Node x index
intThe Node y index
Node::~Node ( )

Destructs a Game object

Member Function Documentation

int Node::getCostNode ( )

Getter # Get the cost

Returns
int The cost to move to the node

Here is the caller graph for this function:

bool Node::getEndNode ( )

Getter # Get If the node is an endNode

Returns
bool If the node is an endNode
int Node::getFScoreNode ( )

Getter # Get the fScore

Returns
int The fScore to of the node
bool Node::getListed ( )

Getter # Get the value of listed

Returns
bool If the node is listed

Here is the caller graph for this function:

int Node::getParentXIndex ( )

Getter # Get the parentNode X index

Returns
int The X index of the parentNode

Here is the caller graph for this function:

int Node::getParentYIndex ( )

Getter # Get the parentNode Y index

Returns
int The Y index of the parentNode

Here is the caller graph for this function:

bool Node::getSafeNode ( )

Getter # Get If the node is safe

Returns
bool If the node is safe

Here is the caller graph for this function:

bool Node::getStartNode ( )

Getter # Get If the node is a startNode

Returns
bool If the node is a startNode

Here is the caller graph for this function:

int Node::getXIndex ( )

Getter # Get the x index

Returns
int The x index of the node

Here is the caller graph for this function:

int Node::getYIndex ( )

Getter # Get the y index

Returns
int The y index of the node

Here is the caller graph for this function:

void Node::setCostNode ( int  cost)

Setter # Set the cost

Parameters
intThe cost to move to the node

Here is the caller graph for this function:

void Node::setEndNode ( bool  endNode)

Setter # Set the node

Parameters
boolThe setting of the node
void Node::setFScoreNode ( int  fScore)

Setter # Set the fScore

Parameters
boolThe fScore to of the node

Here is the caller graph for this function:

void Node::setListed ( bool  listed)

Setter # Set the value of listed

Parameters
boolIf the node is listed
void Node::setParentIndex ( int  parentNodeXIndex,
int  parentNodeYIndex 
)

Setter # Set the parentNode index

Parameters
intThe X index of the parentNode
intThe Y index of the parentNode

Here is the caller graph for this function:

void Node::setSafeNode ( bool  safe)

Setter # Set the node

Parameters
boolThe setting of the node
void Node::setStartNode ( bool  startNode)

Setter # Set the node

Parameters
boolThe setting of the node

Member Data Documentation

int Node::cost
private
bool Node::endNode
private
int Node::fScore
private
bool Node::listed
private
int Node::nodeXIndex
private
int Node::nodeYIndex
private
int Node::parentNodeXIndex
private
int Node::parentNodeYIndex
private
bool Node::safe
private
bool Node::startNode
private

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