31class EXPCL_PANDAAI AIWorld {
34 AICharPool _ai_char_pool;
37 std::vector<NodePath> _obstacles;
38 typedef std::vector<Flock*> FlockPool;
39 FlockPool _flock_pool;
40 void remove_ai_char_from_flock(std::string name);
47 void remove_ai_char(std::string name);
51 void flock_on(
unsigned int flock_id);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void print_list()
This function prints the names of the AI characters that have been added to the AIWorld.
void add_flock(Flock *flock)
This function adds all the AI characters in the Flock object to the AICharPool.
void update()
The AIWorld update function calls the update function of all the AI characters which have been added ...
void remove_flock(unsigned int flock_id)
This function removes the flock behavior completely.
Flock get_flock(unsigned int flock_id)
This function returns a handle to the Flock whose id is passed.
void flock_off(unsigned int flock_id)
This function turns off the flock behavior temporarily.
void flock_on(unsigned int flock_id)
This function turns on the flock behavior.
void add_obstacle(NodePath obstacle)
This function adds the nodepath as an obstacle that is needed by the obstacle avoidance behavior.
void remove_obstacle(NodePath obstacle)
This function removes the nodepath from the obstacles list that is needed by the obstacle avoidance b...
This class is used to define the flock attributes and the AI characters which are part of the flock.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.