This class contains all the members and functions that are required to form an interface between the AIBehaviors class and the PathFinder class.
More...
Public Member Functions |
|
| PathFind (AICharacter *ai_ch) |
| void | add_obstacle_to_mesh (NodePath obstacle) |
| | This function allows the user to dynamically add obstacles to the game environment.
|
| void | assign_neighbor_nodes (const char *navmesh_filename) |
| | This function assigns the neighbor nodes for each main node present in _nav_mesh.
|
| void | clear_path () |
| | Helper function to restore the path and mesh to its initial state.
|
| void | clear_previous_obstacles () |
| | Helper function to reset the collisions if the obstacle is not on the node anymore.
|
| void | create_nav_mesh (const char *navmesh_filename) |
| | This function recreates the navigation mesh from the .csv file.
|
| void | do_dynamic_avoid () |
| | This function does the updation of the collisions to the mesh based on the new positions of the obstacles.
|
| void | dynamic_avoid (NodePath obstacle) |
| | This function starts the pathfinding obstacle navigation for the passed in obstacle.
|
| void | path_find (LVecBase3f pos, string type="normal") |
| | This function checks for the source and target in the navigation mesh for its availability and then finds the best path via the A* algorithm Then it calls the path follower to make the object follow the path.
|
| void | path_find (NodePath target, string type="normal") |
| | This function checks for the source and target in the navigation mesh for its availability and then finds the best path via the A* algorithm Then it calls the path follower to make the object follow the path.
|
|
| PT (GeomNode) _parent |
| void | set_path_find (const char *navmesh_filename) |
| | This function starts the path finding process after reading the given navigation mesh.
|
| void | trace_path (Node *src) |
| | This function is the function which sends the path information one by one to the path follower so that it can store the path needed to be traversed by the pathfinding object.
|
Public Attributes |
|
AICharacter * | _ai_char |
|
bool | _dynamic_avoid |
|
vector< NodePath > | _dynamic_obstacle |
|
int | _grid_size |
|
NavMesh | _nav_mesh |
|
NodePath | _path_find_target |
|
PathFinder * | _path_finder_obj |
|
LineSegs * | _pen |
|
LVecBase3f | _prev_position |
|
vector< int > | _previous_obstacles |
|
NavMesh | _stage_mesh |
This class contains all the members and functions that are required to form an interface between the AIBehaviors class and the PathFinder class.
An object (pointer) of this class is provided in the AIBehaviors class. It is only via this object that the user can activate pathfinding.
Definition at line 36 of file pathFind.h.