arrival.h

00001 ////////////////////////////////////////////////////////////////////////
00002 // Filename    : arrival.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 _ARRIVAL_H
00017 #define _ARRIVAL_H
00018 
00019 #include "aiGlobals.h"
00020 #include "aiCharacter.h"
00021 
00022 class AICharacter;
00023 
00024 class EXPCL_PANDAAI Arrival {
00025 
00026 public:
00027   AICharacter *_ai_char;
00028 
00029   NodePath _arrival_target;
00030   LVecBase3f _arrival_target_pos;
00031   double _arrival_distance;
00032   LVecBase3f _arrival_direction;
00033   bool _arrival_done;
00034 
00035   // This flag specifies if the arrival behavior is being used with seek or pursue behavior.
00036   // True = used with pursue.
00037   // False = used with seek.
00038   bool _arrival_type;
00039 
00040   Arrival(AICharacter *ai_ch, double distance = 10.0);
00041   ~Arrival();
00042   LVecBase3f do_arrival();
00043   void arrival_activate();
00044 };
00045 
00046 #endif