00001 #ifndef OBSTACLE_AVOIDANCE_H
00002 #define OBSTACLE_AVOIDANCE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "aiCharacter.h"
00020 #include "boundingSphere.h"
00021
00022 class AICharacter;
00023
00024 class EXPCL_PANDAAI ObstacleAvoidance {
00025 public :
00026 AICharacter *_ai_char;
00027 float _obstacle_avoidance_weight;
00028 NodePath _nearest_obstacle;
00029 bool _obstacle_avoidance_done;
00030 float _feeler;
00031
00032 ObstacleAvoidance(AICharacter *ai_char, float feeler_length);
00033 LVecBase3f do_obstacle_avoidance();
00034 ~ObstacleAvoidance();
00035 void obstacle_avoidance_activate();
00036 bool obstacle_detection();
00037 };
00038
00039 #endif