|
Panda3D
|
Public Member Functions | |
| ObstacleAvoidance (AICharacter *ai_char, float feeler_length) | |
| LVecBase3 | do_obstacle_avoidance () |
| This function returns the force necessary by the AICharacter to avoid the nearest obstacle detected by obstacle_detection function NOTE : This assumes the obstacles are spherical. | |
| void | obstacle_avoidance_activate () |
| This function activates obstacle_avoidance if a obstacle is detected. | |
| bool | obstacle_detection () |
| This function checks if an obstacle is near to the AICharacter and if an obstacle is detected returns true. | |
Public Attributes | |
| AICharacter * | _ai_char |
| float | _feeler |
| NodePath | _nearest_obstacle |
| bool | _obstacle_avoidance_done |
| float | _obstacle_avoidance_weight |
Definition at line 22 of file obstacleAvoidance.h.
| ObstacleAvoidance::ObstacleAvoidance | ( | AICharacter * | ai_char, |
| float | feeler_length ) |
Definition at line 18 of file obstacleAvoidance.cxx.
| ObstacleAvoidance::~ObstacleAvoidance | ( | ) |
Definition at line 24 of file obstacleAvoidance.cxx.
| LVecBase3 ObstacleAvoidance::do_obstacle_avoidance | ( | ) |
This function returns the force necessary by the AICharacter to avoid the nearest obstacle detected by obstacle_detection function NOTE : This assumes the obstacles are spherical.
Definition at line 86 of file obstacleAvoidance.cxx.
References obstacle_detection().
| void ObstacleAvoidance::obstacle_avoidance_activate | ( | ) |
This function activates obstacle_avoidance if a obstacle is detected.
Definition at line 73 of file obstacleAvoidance.cxx.
References obstacle_detection().
| bool ObstacleAvoidance::obstacle_detection | ( | ) |
This function checks if an obstacle is near to the AICharacter and if an obstacle is detected returns true.
Definition at line 32 of file obstacleAvoidance.cxx.
References NodePath::get_bounds().
Referenced by do_obstacle_avoidance(), and obstacle_avoidance_activate().
| AICharacter* ObstacleAvoidance::_ai_char |
Definition at line 24 of file obstacleAvoidance.h.
| float ObstacleAvoidance::_feeler |
Definition at line 28 of file obstacleAvoidance.h.
| NodePath ObstacleAvoidance::_nearest_obstacle |
Definition at line 26 of file obstacleAvoidance.h.
| bool ObstacleAvoidance::_obstacle_avoidance_done |
Definition at line 27 of file obstacleAvoidance.h.
| float ObstacleAvoidance::_obstacle_avoidance_weight |
Definition at line 25 of file obstacleAvoidance.h.