|
UFO: Alien Invasion
|
AiAreaSearch class, used to get an area of the map around a certain position for the AI to check possible moving positions. More...
#include <g_ai.h>

Data Structures | |
| class | LQueue |
| A simple queue class. More... | |
Public Member Functions | |
| AiAreaSearch () | |
| Initializes an AiAreaSearch object to default values. | |
| AiAreaSearch (const pos3_t origin, int radius, bool flat=false) | |
| Initializes an AiAreaSearch object with specific starting point and search radius. | |
| ~AiAreaSearch (void) | |
| Clear AiAreaSearch internal data. | |
| bool | getNext (pos3_t pos) |
| Get next position in the search area. | |
Private Member Functions | |
| void | plotArea (const pos3_t origin, int radius, bool flat=false) |
| Calculate the search area. | |
| void | plotCircle (const pos3_t origin, int radius) |
| void | plotPos (const pos3_t origin, int xOfs, int yOfs) |
Private Attributes | |
| LQueue | _area |
AiAreaSearch class, used to get an area of the map around a certain position for the AI to check possible moving positions.
| AiAreaSearch::AiAreaSearch | ( | void | ) |
Initializes an AiAreaSearch object to default values.
Definition at line 56 of file g_ai.cpp.
References plotArea(), and pos3_origin.
Initializes an AiAreaSearch object with specific starting point and search radius.
Definition at line 63 of file g_ai.cpp.
References plotArea().
| AiAreaSearch::~AiAreaSearch | ( | void | ) |
| bool AiAreaSearch::getNext | ( | pos3_t | pos | ) |
Get next position in the search area.
| [out] | pos | The next position in the search area. return true if a new position was found false otherwise. |
Definition at line 79 of file g_ai.cpp.
References _area.
Referenced by AI_FindHerdLocation(), AI_FindHidingLocation(), AI_FindMissionLocation(), AI_PrepBestAction(), AIL_positionflee(), AIL_positionshoot(), and AIL_positionwander().
Calculate the search area.
| [in] | origin | The starting position for the search. |
| [in] | radius | Radius to search around the starting position. |
| [in] | flat | If true only the level with the starting position is searched. |
Definition at line 143 of file g_ai.cpp.
References i, PATHFINDING_HEIGHT, and plotCircle().
Referenced by AiAreaSearch(), and AiAreaSearch().
Definition at line 165 of file g_ai.cpp.
References PATHFINDING_HEIGHT, and plotPos().
Referenced by plotArea().
Definition at line 203 of file g_ai.cpp.
References _area, gi, PATHFINDING_WIDTH, and PosToVec.
Referenced by plotCircle().
|
private |
Queue containing the positions in the search area
Definition at line 70 of file g_ai.h.
Referenced by getNext(), plotPos(), and ~AiAreaSearch().