this is the class for nodes and their attributes More...
#include <GridNodes.h>
Public Member Functions | |
GridNodes (ngl::Vec3 _pos, ngl::Colour _c, GLfloat _r, const std::string &_shaderName, Graph *_parent, int _index) | |
constructor must be called by the child classes | |
~GridNodes () | |
brief destructor | |
void | draw () const |
draw the nodes | |
ngl::Vec3 const | getPosition () |
get current position | |
int | getIndex () |
get the index of the node | |
void | setIndex (const int i) |
set the index of the node | |
void | setOccupiedStatus () |
set the occupied status of the node | |
void | desetOccupiedStatus () |
deset the occupied status of the node | |
int | getOccupiedStatus () |
get the occupied status of the node | |
Public Attributes | |
int | m_onOff |
variable indication if the node is available to traverse or not | |
int | m_occupied |
variable to indicate how many agents occupied the present node | |
Protected Attributes | |
ngl::Vec3 | m_pos |
Position of the Particle. | |
ngl::Vec3 | m_dir |
Direction of the Particle. | |
ngl::Colour | m_colour |
Colour of the Particle. | |
std::string | m_shaderName |
the name of the shader to use | |
Graph * | m_parent |
the parent Graph | |
GLfloat | m_radius |
the current radius for the sphere | |
int | m_index |
this is the class for nodes and their attributes
Definition at line 29 of file GridNodes.h.
GridNodes::GridNodes | ( | ngl::Vec3 | _pos, | |
ngl::Colour | _c, | |||
GLfloat | _r, | |||
const std::string & | _shaderName, | |||
Graph * | _parent, | |||
int | _index | |||
) |
constructor must be called by the child classes
[in] | _pos | the position of the particle |
[in] | _c | the colour of the particle |
[in] | _shaderName | the name of the shader to use |
[in] | _parent | the parent (Emitter used to query global values) |
[in] | _index | of the node |
GridNodes::~GridNodes | ( | ) |
brief destructor
void GridNodes::desetOccupiedStatus | ( | ) | [inline] |
deset the occupied status of the node
Definition at line 52 of file GridNodes.h.
References m_occupied.
00052 {--m_occupied;}
void GridNodes::draw | ( | ) | const |
draw the nodes
int GridNodes::getIndex | ( | ) | [inline] |
get the index of the node
Definition at line 46 of file GridNodes.h.
References m_index.
00046 {return m_index;}
int GridNodes::getOccupiedStatus | ( | ) | [inline] |
get the occupied status of the node
Definition at line 54 of file GridNodes.h.
References m_occupied.
00054 {return m_occupied;}
ngl::Vec3 const GridNodes::getPosition | ( | ) | [inline] |
get current position
Definition at line 44 of file GridNodes.h.
References m_pos.
00044 {return m_pos;}
void GridNodes::setIndex | ( | const int | i | ) | [inline] |
set the index of the node
Definition at line 48 of file GridNodes.h.
References m_index.
00048 {m_index = i;}
void GridNodes::setOccupiedStatus | ( | ) | [inline] |
set the occupied status of the node
Definition at line 50 of file GridNodes.h.
References m_occupied.
00050 {++m_occupied;}
ngl::Colour GridNodes::m_colour [protected] |
Colour of the Particle.
Definition at line 70 of file GridNodes.h.
ngl::Vec3 GridNodes::m_dir [protected] |
Direction of the Particle.
Definition at line 68 of file GridNodes.h.
int GridNodes::m_index [protected] |
the | index of the node |
Definition at line 78 of file GridNodes.h.
variable to indicate how many agents occupied the present node
Definition at line 58 of file GridNodes.h.
variable indication if the node is available to traverse or not
Definition at line 56 of file GridNodes.h.
Graph* GridNodes::m_parent [protected] |
the parent Graph
Definition at line 74 of file GridNodes.h.
ngl::Vec3 GridNodes::m_pos [protected] |
Position of the Particle.
Definition at line 66 of file GridNodes.h.
GLfloat GridNodes::m_radius [protected] |
the current radius for the sphere
Definition at line 76 of file GridNodes.h.
std::string GridNodes::m_shaderName [protected] |
the name of the shader to use
Definition at line 72 of file GridNodes.h.