Panda3D
flee.h
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 flee.h
10  * @author Deepak, John, Navin
11  * @date 2009-10-24
12  */
13 
14 #ifndef _FLEE_H
15 #define _FLEE_H
16 
17 #include "aiGlobals.h"
18 #include "aiCharacter.h"
19 
20 class AICharacter;
21 
22 class EXPCL_PANDAAI Flee {
23 public:
24  AICharacter *_ai_char;
25 
26  LVecBase3 _flee_position;
27  float _flee_weight;
28  LVecBase3 _flee_direction;
29  double _flee_distance;
30  double _flee_relax_distance;
31  LVecBase3 _flee_present_pos;
32  bool _flee_done;
33  bool _flee_activate_done;
34 
35  Flee(AICharacter *ai_ch, NodePath target_object, double panic_distance = 10.0,
36  double relax_distance = 10.0, float flee_wt = 1.0);
37 
38  Flee(AICharacter *ai_ch, LVecBase3 pos, double panic_distance = 10.0,
39  double relax_distance = 10.0, float flee_wt = 1.0);
40 
41  ~Flee();
42  LVecBase3 do_flee();
43  void flee_activate();
44 };
45 
46 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Definition: flee.h:22
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:161