Panda3D

flee.h

00001 ////////////////////////////////////////////////////////////////////////
00002 // Filename    : flee.h
00003 // Created by  : Deepak, John, Navin
00004 // Date        :  24 Oct 09
00005 ////////////////////////////////////////////////////////////////////
00006 //
00007 // PANDA 3D SOFTWARE
00008 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00009 //
00010 // All use of this software is subject to the terms of the revised BSD
00011 // license.  You should have received a copy of this license along
00012 // with this source code in a file named "LICENSE."
00013 //
00014 ////////////////////////////////////////////////////////////////////
00015 
00016 #ifndef _FLEE_H
00017 #define _FLEE_H
00018 
00019 #include "aiGlobals.h"
00020 #include "aiCharacter.h"
00021 
00022 class AICharacter;
00023 
00024 class EXPCL_PANDAAI Flee {
00025 
00026 public:
00027   AICharacter *_ai_char;
00028 
00029   LVecBase3f _flee_position;
00030   float _flee_weight;
00031   LVecBase3f _flee_direction;
00032   double _flee_distance;
00033   double _flee_relax_distance;
00034   LVecBase3f _flee_present_pos;
00035   bool _flee_done;
00036   bool _flee_activate_done;
00037 
00038   Flee(AICharacter *ai_ch, NodePath target_object, double panic_distance = 10.0,
00039                               double relax_distance = 10.0, float flee_wt = 1.0);
00040 
00041   Flee(AICharacter *ai_ch, LVecBase3f pos, double panic_distance = 10.0,
00042                               double relax_distance = 10.0, float flee_wt = 1.0);
00043 
00044   ~Flee();
00045   LVecBase3f do_flee();
00046   void flee_activate();
00047 };
00048 
00049 #endif
 All Classes Functions Variables Enumerations