#include <patrolUnit.h>
Inheritance diagram for patrolUnit:


Public Member Functions | |
| patrolUnit (int x, int y) | |
| patrolUnit (int _x, int _y, int numPLocations, unitSimulation *us) | |
| Creates a patrol unit and assigns it numPLocations random locations to patrol. | |
| virtual const char * | getName () |
| virtual tDirection | makeMove (mapProvider *, reservationProvider *, simulationInfo *simInfo) |
| The new makeMove only gives a map. | |
| void | openGLDraw (mapProvider *, simulationInfo *) |
| Draw the unit. | |
| void | addPatrolLocation (unit *) |
| unit * | getTarget () |
| void | updateLocation (int _x, int _y, bool worked, simulationInfo *) |
| updateLocation only tells a unit where it is located, it doesn't physically change the location in the world | |
| void | logStats (statCollection *stats) |
| log an stats that may have been computed during the last run | |
| void | logFinalStats (statCollection *stats) |
| log any final one-time stats before a simulation is ended | |
Private Member Functions | |
| double | goToLoc (mapAbstraction *aMap, int which) |
| void | addPathToCache (path *p) |
Private Attributes | |
| std::vector< tDirection > | moves |
| std::vector< unit * > | Locs |
| aStar | a |
| int | currTarget |
| int | nodesExpanded |
| int | nodesTouched |
|
||||||||||||
|
|
|
||||||||||||||||||||
|
Creates a patrol unit and assigns it numPLocations random locations to patrol. The last location is the unit's starting position to create a loop |
|
|
|
|
|
|
|
|
Reimplemented from unit. |
|
|
Reimplemented from unit. |
|
||||||||||||
|
|
|
|
log any final one-time stats before a simulation is ended
Reimplemented from unit. |
|
|
log an stats that may have been computed during the last run No stats collected by default. Reimplemented from unit. |
|
||||||||||||||||
|
The new makeMove only gives a map. The unit simulation won't calculate an mapAbstraction unless it has to. Thus, in simple pathfinding tests, the overhead is saved. Reimplemented from unit. |
|
||||||||||||
|
Draw the unit. Draw the unit using openGL. Overload this if you want a custom look for the unit. Reimplemented from unit. |
|
||||||||||||||||||||
|
updateLocation only tells a unit where it is located, it doesn't physically change the location in the world
Reimplemented from unit. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.4