Panda3D
Loading...
Searching...
No Matches
pathFollow.h
1
2#ifndef _PATHFOLLOW_H
3#define _PATHFOLLOW_H
4
5#include "aiGlobals.h"
6#include "aiCharacter.h"
7#include "meshNode.h"
8
9class AICharacter;
10
11class EXPCL_PANDAAI PathFollow {
12
13public:
14 AICharacter *_ai_char;
15 float _follow_weight;
16 std::vector<LVecBase3> _path;
17 int _curr_path_waypoint;
18 bool _start;
19 NodePath _dummy;
20 std::string _type;
21 ClockObject *_myClock;
22 float _time;
23
24 PathFollow(AICharacter *ai_ch, float follow_wt);
25 ~PathFollow();
26 void add_to_path(LVecBase3 pos);
27 void start(std::string type);
28 void do_follow();
29 bool check_if_possible();
30};
31
32#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A ClockObject keeps track of elapsed real time and discrete time.
Definition clockObject.h:58
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition nodePath.h:159
void do_follow()
This function allows continuous path finding by ai chars.
void start(std::string type)
This function initiates the path follow behavior.
bool check_if_possible()
This function checks if the current positions of the ai char and the target char can be used to gener...
void add_to_path(LVecBase3 pos)
This function adds the positions generated from a pathfind or a simple path follow behavior to the _p...