Brain Class Reference
the variables and methods that a Brain contains put in this file
More...
#include <Brain.h>
List of all members.
Public Member Functions |
| Brain (std::string *_script, PyObject *_main, PyObject *_dict, ngl::Vec3 &_pos, ngl::Vec3 &_vel, AIagent *_p, Graph *_graph) |
| ctor
|
| ~Brain () |
| dtor
|
void | setScript (std::string *_script) |
| set the python script#
|
ngl::Vec3 | getPos () |
| get the position of the agent
|
void | setPos (const ngl::Vec3 _pos) |
| set the pos of the agent
|
void | setVel (const ngl::Vec3 _vel) |
| set the velocity of the agent
|
ngl::Vec3 | getVelocity () |
| get the velocity
|
ngl::Vec3 | getForce () |
| get the force
|
void | brainFunction () |
| a method to execute the script
|
void | reset () |
| recet the brain script
|
void | setGraphdata () |
| set the graph data to traversal
|
Private Attributes |
ngl::Vec3 | m_pos |
| the position of the agent, this will be represented as pos in the python sctipt
|
ngl::Vec3 | m_dir |
| the direction of the agent, this will be represented as dir in the python sctipt
|
ngl::Vec3 | m_velocity |
| the speed of the agent, this will be represented as speed in the python sctipt
|
ngl::Vec3 | m_force |
| the force on the agent, this will be represented as force in the python sctipt
|
std::string * | m_script |
| the source string of the python script to be run
|
std::string | m_filename |
| the name of the source string loaded (for the re-load)
|
PyObject * | m_main |
| these are the python object we are going to hook into the above objects
|
PyObject * | m_dict |
| a pointer to the python dictionary for all variables in __main__
|
PyObject * | m_pyPos |
| the python object used to get the pos and m_pos data to and from the scripts / agent
|
PyObject * | m_pyDir |
| the python object used to get the dir and m_dir data to and from the scripts / agent
|
PyObject * | m_pySpeed |
| the python object used to get the speed and m_speed data to and from the scripts / agent
|
PyObject * | m_pyForce |
| the python object used to get the force and m_force data to and from the scripts / agent
|
PyObject * | m_pyGraph |
| the python object used to get the speed and m_speed data to and from the scripts / agent
|
PyObject * | m_startScript |
| the python object used to check if the script is executed for the first time
|
AIagent * | m_parent |
| the parent Agent
|
bool | m_queryResponse |
| the response to the query
|
Graph * | m_graph |
| the Graph
|
PyObject * | m_pyNodes |
| the Nodes for the Graph
|
PyObject * | m_pyNodePos |
| the Node position
|
PyObject * | m_pyNextNodePos |
| the Next Node position
|
PyObject * | m_pyEdgeData |
| the Edge data position
|
PyObject * | m_pyDirection |
| the Edge data position
|
PyObject * | m_pyMessage |
| the Message
|
PyObject * | m_pyChase |
| the variable to pass the data to chase
|
PyObject * | m_pyHome |
| the variable to hold the home position value
|
PyObject * | m_pyState |
| the State of the Agents
|
int | m_index |
| the index
|
int | m_nextIndex |
| the nextIndex
|
Detailed Description
the variables and methods that a Brain contains put in this file
Definition at line 34 of file Brain.h.
Constructor & Destructor Documentation
Brain::Brain |
( |
std::string * |
_script, |
|
|
PyObject * |
_main, |
|
|
PyObject * |
_dict, |
|
|
ngl::Vec3 & |
_pos, |
|
|
ngl::Vec3 & |
_vel, |
|
|
AIagent * |
_p, |
|
|
Graph * |
_graph | |
|
) |
| | |
ctor
- Parameters:
-
[in] | the | name of the python file to load, this will be stored so the file can be re-loaded. |
[in] | Python | variable main |
[in] | Python | variable dictionary |
[in] | the | initial position on the graph node where the agent is placed |
[in] | the | initial velocity |
[in] | the | parent agent |
[in] | the | graph variable for traversing |
Member Function Documentation
void Brain::brainFunction |
( |
|
) |
|
a method to execute the script
ngl::Vec3 Brain::getForce |
( |
|
) |
[inline] |
ngl::Vec3 Brain::getPos |
( |
|
) |
[inline] |
get the position of the agent
Definition at line 61 of file Brain.h.
References m_pos.
ngl::Vec3 Brain::getVelocity |
( |
|
) |
[inline] |
void Brain::setGraphdata |
( |
|
) |
|
set the graph data to traversal
void Brain::setPos |
( |
const ngl::Vec3 |
_pos |
) |
[inline] |
set the pos of the agent
- Parameters:
-
[in] | the | new position _pos |
Definition at line 66 of file Brain.h.
References m_pos.
void Brain::setScript |
( |
std::string * |
_script |
) |
[inline] |
set the python script#
- Parameters:
-
[in] | _script | the new script to set |
Definition at line 57 of file Brain.h.
References m_script.
void Brain::setVel |
( |
const ngl::Vec3 |
_vel |
) |
[inline] |
set the velocity of the agent
- Parameters:
-
[in] | the | new velocity _vel |
Definition at line 71 of file Brain.h.
References m_velocity.
Member Data Documentation
a pointer to the python dictionary for all variables in __main__
Definition at line 131 of file Brain.h.
the direction of the agent, this will be represented as dir in the python sctipt
Definition at line 105 of file Brain.h.
the name of the source string loaded (for the re-load)
Definition at line 121 of file Brain.h.
the force on the agent, this will be represented as force in the python sctipt
Definition at line 113 of file Brain.h.
these are the python object we are going to hook into the above objects
a hook into the python __main__ function where I program is to be run from
Definition at line 127 of file Brain.h.
the nextIndex
Definition at line 211 of file Brain.h.
the position of the agent, this will be represented as pos in the python sctipt
Definition at line 101 of file Brain.h.
the variable to pass the data to chase
Definition at line 195 of file Brain.h.
the python object used to get the dir and m_dir data to and from the scripts / agent
Definition at line 139 of file Brain.h.
the Edge data position
Definition at line 187 of file Brain.h.
the Edge data position
Definition at line 183 of file Brain.h.
the python object used to get the force and m_force data to and from the scripts / agent
Definition at line 147 of file Brain.h.
the python object used to get the speed and m_speed data to and from the scripts / agent
Definition at line 151 of file Brain.h.
the variable to hold the home position value
Definition at line 199 of file Brain.h.
the Message
Definition at line 191 of file Brain.h.
the Next Node position
Definition at line 179 of file Brain.h.
the Node position
Definition at line 175 of file Brain.h.
the python object used to get the pos and m_pos data to and from the scripts / agent
Definition at line 135 of file Brain.h.
the python object used to get the speed and m_speed data to and from the scripts / agent
Definition at line 143 of file Brain.h.
the State of the Agents
Definition at line 203 of file Brain.h.
the response to the query
Definition at line 163 of file Brain.h.
the source string of the python script to be run
Definition at line 117 of file Brain.h.
the python object used to check if the script is executed for the first time
Definition at line 155 of file Brain.h.
the speed of the agent, this will be represented as speed in the python sctipt
Definition at line 109 of file Brain.h.
The documentation for this class was generated from the following file: