PathFollow Class Reference

#include <pathFollow.h>

Collaboration diagram for PathFollow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PathFollow (AICharacter *ai_ch, float follow_wt)
 ~PathFollow ()
void add_to_path (LVecBase3f pos)
void start (string type)
void do_follow ()
bool check_if_possible ()

Public Attributes

AICharacter_ai_char
float _follow_weight
vector< LVecBase3f > _path
int _curr_path_waypoint
bool _start
NodePath _dummy
string _type
ClockObject * _myClock
float _time

Detailed Description

Definition at line 11 of file pathFollow.h.


Constructor & Destructor Documentation

PathFollow::PathFollow ( AICharacter ai_ch,
float  follow_wt 
)

Definition at line 4 of file pathFollow.cxx.

PathFollow::~PathFollow (  ) 

Definition at line 12 of file pathFollow.cxx.


Member Function Documentation

void PathFollow::add_to_path ( LVecBase3f  pos  ) 

Function : add_to_path Description : 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.

Here is the caller graph for this function:

bool PathFollow::check_if_possible (  ) 

Function : check_if_possible Description : 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.

Here is the call graph for this function:

Here is the caller graph for this function:

void PathFollow::do_follow (  ) 

Function : do_follow Description : 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.

Here is the call graph for this function:

Here is the caller graph for this function:

void PathFollow::start ( string  type  ) 

Function : start Description : This function initiates the path follow behavior.

Definition at line 34 of file pathFollow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 14 of file pathFollow.h.

Definition at line 17 of file pathFollow.h.

Definition at line 19 of file pathFollow.h.

Definition at line 15 of file pathFollow.h.

ClockObject* PathFollow::_myClock

Definition at line 21 of file pathFollow.h.

vector<LVecBase3f> PathFollow::_path

Definition at line 16 of file pathFollow.h.

Definition at line 18 of file pathFollow.h.

Definition at line 22 of file pathFollow.h.

Definition at line 20 of file pathFollow.h.


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

Generated on Tue Dec 8 01:13:34 2009 for Pandai by  doxygen 1.6.1