Panda3D
flock.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file flock.cxx
10  * @author Deepak, John, Navin
11  * @date 2009-10-24
12  */
13 
14 #include "flock.h"
15 
16 Flock::Flock(unsigned int flock_id, double vcone_angle, double vcone_radius, unsigned int separation_wt,
17  unsigned int cohesion_wt, unsigned int alignment_wt) {
18  _flock_id = flock_id;
19  _flock_vcone_angle = vcone_angle;
20  _flock_vcone_radius = vcone_radius;
21  _separation_wt = separation_wt;
22  _cohesion_wt = cohesion_wt;
23  _alignment_wt = alignment_wt;
24 }
25 
26 Flock::~Flock() {
27 }
28 
29 /**
30  * This function adds AI characters to the flock.
31  */
33  ai_char->_ai_char_flock_id = _flock_id;
34  ai_char->_steering->_flock_group = this;
35  _ai_char_list.push_back(ai_char);
36 }
37 
38 unsigned int Flock::get_id() {
39  return _flock_id;
40 }
void add_ai_char(AICharacter *ai_char)
This function adds AI characters to the flock.
Definition: flock.cxx:32
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.