Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Private Attributes | List of all members
JAM_Node Class Reference

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

#include <Node.h>

Collaboration diagram for JAM_Node:
Collaboration graph

Public Member Functions

 JAM_Node (int nodeXIndex, int nodeYIndex)
 
 ~JAM_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 for use with path finding.

Author
Jamie Slowgrove Reference ~ This is a modified version of my nodes from my AI assignment.

Constructor & Destructor Documentation

JAM_Node::JAM_Node ( int  nodeXIndex,
int  nodeYIndex 
)

Constructs the Node object.

Parameters
nodeXIndexThe Node x index.
nodeYIndexThe Node y index.
JAM_Node::~JAM_Node ( )

Destructs the Node object.

Member Function Documentation

int JAM_Node::getCostNode ( )

Getter # Get the cost.

Returns
The cost to move to the node.

Here is the caller graph for this function:

bool JAM_Node::getEndNode ( )

Getter # Get If the node is an endNode.

Returns
If the node is an endNode.
int JAM_Node::getFScoreNode ( )

Getter # Get the fScore.

Returns
The fScore to of the node.
bool JAM_Node::getListed ( )

Getter # Get the value of listed.

Returns
If the node is listed.

Here is the caller graph for this function:

int JAM_Node::getParentXIndex ( )

Getter # Get the parentNode X index.

Returns
The X index of the parentNode.

Here is the caller graph for this function:

int JAM_Node::getParentYIndex ( )

Getter # Get the parentNode Y index.

Returns
The Y index of the parentNode.

Here is the caller graph for this function:

bool JAM_Node::getSafeNode ( )

Getter # Get If the node is safe.

Returns
If the node is safe.

Here is the caller graph for this function:

bool JAM_Node::getStartNode ( )

Getter # Get If the node is a startNode.

Returns
If the node is a startNode.

Here is the caller graph for this function:

int JAM_Node::getXIndex ( )

Getter # Get the x index.

Returns
The x index of the node.

Here is the caller graph for this function:

int JAM_Node::getYIndex ( )

Getter # Get the y index.

Returns
The y index of the node.

Here is the caller graph for this function:

void JAM_Node::setCostNode ( int  cost)

Setter # Set the cost.

Parameters
costThe cost to move to the node.

Here is the caller graph for this function:

void JAM_Node::setEndNode ( bool  endNode)

Setter # Set the node.

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

Setter # Set the fScore.

Parameters
fScoreThe fScore to of the node.

Here is the caller graph for this function:

void JAM_Node::setListed ( bool  listed)

Setter # Set the value of listed.

Parameters
listedIf the node is listed.
void JAM_Node::setParentIndex ( int  parentNodeXIndex,
int  parentNodeYIndex 
)

Setter # Set the parentNode index.

Parameters
parentNodeXIndexThe X index of the parentNode.
parentNodeYIndexThe Y index of the parentNode.

Here is the caller graph for this function:

void JAM_Node::setSafeNode ( bool  safe)

Setter # Set the node.

Parameters
safeThe setting of the node.
void JAM_Node::setStartNode ( bool  startNode)

Setter # Set the node.

Parameters
startNodeThe setting of the node.

Member Data Documentation

int JAM_Node::cost
private

The cost to move to the node.

bool JAM_Node::endNode
private
int JAM_Node::fScore
private

The f score of the node.

bool JAM_Node::listed
private

Boolean values for if the node is on a list.

int JAM_Node::nodeXIndex
private

The index of the node.

int JAM_Node::nodeYIndex
private
int JAM_Node::parentNodeXIndex
private

The index of the parent node.

int JAM_Node::parentNodeYIndex
private
bool JAM_Node::safe
private

If the node safe to walk on.

bool JAM_Node::startNode
private

Boolean values to if they are a specific node.


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