Panda3D
|
00001 #ifndef OBSTACLE_AVOIDANCE_H 00002 #define OBSTACLE_AVOIDANCE_H 00003 00004 //////////////////////////////////////////////////////////////////////// 00005 // Filename : obstacleAvoidance.h 00006 // Created by : Deepak, John, Navin 00007 // Date : 10 Nov 2009 00008 //////////////////////////////////////////////////////////////////// 00009 // 00010 // PANDA 3D SOFTWARE 00011 // Copyright (c) Carnegie Mellon University. All rights reserved. 00012 // 00013 // All use of this software is subject to the terms of the revised BSD 00014 // license. You should have received a copy of this license along 00015 // with this source code in a file named "LICENSE." 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