#include <aiWorld.h>
Public Types | |
typedef std::vector< Flock * > | FlockPool |
Public Member Functions | |
void | remove_ai_char_from_flock (string name) |
~AIWorld () | |
void | add_ai_char (AICharacter *ai_ch) |
void | remove_ai_char (string name) |
void | add_flock (Flock *flock) |
void | flock_off (unsigned int flock_id) |
void | flock_on (unsigned int flock_id) |
void | remove_flock (unsigned int flock_id) |
Flock | get_flock (unsigned int flock_id) |
void | add_obstacle (NodePath obstacle) |
void | remove_obstacle (NodePath obstacle) |
void | print_list () |
void | update () |
Public Attributes | |
vector< NodePath > | _obstacles |
FlockPool | _flock_pool |
PUBLISHED | __pad0__: AIWorld(NodePath render) |
Class : AIWorld Description : A class that implements the virtual AI world which keeps track of the AI characters active at any given time. It contains a linked list of AI characters, obstactle data and unique name for each character. It also updates each characters state. The AI characters can also be added to the world as flocks.
Definition at line 68 of file aiWorld.h.
typedef std::vector<Flock*> AIWorld::FlockPool |
AIWorld::~AIWorld | ( | ) |
Definition at line 22 of file aiWorld.cxx.
void AIWorld::add_ai_char | ( | AICharacter * | ai_ch | ) |
Definition at line 25 of file aiWorld.cxx.
void AIWorld::add_flock | ( | Flock * | flock | ) |
Function : add_flock Description : This function adds all the AI characters in the Flock object to the AICharPool. This function allows adding the AI characetrs as part of a flock.
Definition at line 84 of file aiWorld.cxx.
void AIWorld::add_obstacle | ( | NodePath | obstacle | ) |
Function : add_obstacle Description : This function adds the nodepath as an obstacle that is needed by the obstacle avoidance behavior.
Definition at line 261 of file aiWorld.cxx.
void AIWorld::flock_off | ( | unsigned int | flock_id | ) |
Function : flock_off Description : This function turns off the flock behavior temporarily. Similar to pausing the behavior.
Definition at line 139 of file aiWorld.cxx.
void AIWorld::flock_on | ( | unsigned int | flock_id | ) |
Function : flock_on Description : This function turns on the flock behavior.
Definition at line 158 of file aiWorld.cxx.
Flock AIWorld::get_flock | ( | unsigned int | flock_id | ) |
Function : get_flock Description : This function returns a handle to the Flock whose id is passed.
Definition at line 100 of file aiWorld.cxx.
void AIWorld::print_list | ( | ) |
void AIWorld::remove_ai_char | ( | string | name | ) |
void AIWorld::remove_ai_char_from_flock | ( | string | name | ) |
void AIWorld::remove_flock | ( | unsigned int | flock_id | ) |
Function : remove_flock Description : This function removes the flock behavior completely.
Definition at line 117 of file aiWorld.cxx.
void AIWorld::remove_obstacle | ( | NodePath | obstacle | ) |
Function : remove_obstacle Description : This function removes the nodepath from the obstacles list that is needed by the obstacle avoidance behavior.
Definition at line 273 of file aiWorld.cxx.
void AIWorld::update | ( | ) |
Function : update Description : The AIWorld update function calls the update function of all the AI characters which have been added to the AIWorld.
Definition at line 65 of file aiWorld.cxx.
PUBLISHED AIWorld::__pad0__ |
vector<NodePath> AIWorld::_obstacles |