Panda3D
Public Member Functions | Public Attributes
PathFollow Class Reference

List of all members.

Public Member Functions

 PathFollow (AICharacter *ai_ch, float follow_wt)
void add_to_path (LVecBase3f pos)
 This function adds the positions generated from a pathfind or a simple path follow behavior to the _path list.
bool check_if_possible ()
 This function checks if the current positions of the ai char and the target char can be used to generate an optimal path.
void do_follow ()
 This function allows continuous path finding by ai chars.
void start (string type)
 This function initiates the path follow behavior.

Public Attributes

AICharacter_ai_char
int _curr_path_waypoint
NodePath _dummy
float _follow_weight
ClockObject_myClock
vector< LVecBase3f_path
bool _start
float _time
string _type

Detailed Description

Definition at line 11 of file pathFollow.h.


Member Function Documentation

This function adds the positions generated from a pathfind or a simple path follow behavior to the _path list.

Definition at line 23 of file pathFollow.cxx.

Referenced by AIBehaviors::add_to_path().

This function checks if the current positions of the ai char and the target char can be used to generate an optimal path.

Definition at line 120 of file pathFollow.cxx.

References NodePath::get_pos().

Referenced by do_follow().

This function allows continuous path finding by ai chars.

There are 2 ways in which this is implemented. 1. The character re-calculates the optimal path everytime the target changes its position. Less computationally expensive. 2. The character continuosly re-calculates its optimal path to the target. This is used in a scenario where the ai chars have to avoid other ai chars. More computationally expensive.

Definition at line 59 of file pathFollow.cxx.

References check_if_possible(), PathFind::do_dynamic_avoid(), NodePath::get_pos(), ClockObject::get_real_time(), PathFind::path_find(), and NodePath::set_pos().

Referenced by AIBehaviors::calculate_prioritized().

void PathFollow::start ( string  type)

This function initiates the path follow behavior.

Definition at line 34 of file pathFollow.cxx.

References NodePath::attach_new_node(), ClockObject::get_real_time(), AIBehaviors::pursue(), and NodePath::set_pos().

Referenced by AIBehaviors::start_follow().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations