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