|
| cAINodeContainer (const tString &asName, const tString &asNodeName, cWorld3D *apWorld, const cVector3f &avCollideSize) |
|
const tString & | GetNodeName () |
|
const tString & | GetName () |
|
const cVector3f & | GetCollideSize () |
|
void | ReserveSpace (size_t alReserveSpace) |
|
void | AddNode (const tString &asName, const cVector3f &avPosition, void *apUserData=NULL) |
|
int | GetNodeNum () const |
|
cAINode * | GetNode (int alIdx) |
|
cAINode * | GetNodeFromName (const tString &asName) |
|
void | Compile () |
|
void | BuildNodeGridMap () |
|
cAINodeIterator | GetNodeIterator (const cVector3f &avPosition, float afRadius) |
|
bool | FreePath (const cVector3f &avStart, const cVector3f &avEnd, int alRayNum=-1, tAIFreePathFlag aFlags=0, iAIFreePathCallback *apCallback=NULL) |
|
void | SetMaxEdges (int alX) |
|
void | SetMinEdges (int alX) |
|
void | SetMaxEdgeDistance (float afX) |
|
float | GetMaxEdgeDistance () const |
|
void | SetMaxHeight (float afX) |
|
float | GetMaxHeight () const |
|
void | SetNodeIsAtCenter (bool abX) |
|
bool | GetNodeIsAtCenter () |
|
void | SaveToFile (const tString &asFile) |
|
void | LoadFromFile (const tString &asFile) |
|
◆ ReserveSpace()
void hpl::cAINodeContainer::ReserveSpace |
( |
size_t |
alReserveSpace | ) |
|
Reserves spaces for nodes.
- Parameters
-
alReserveSpace | Number of nodes to reserve space for. |
◆ AddNode()
void hpl::cAINodeContainer::AddNode |
( |
const tString & |
asName, |
|
|
const cVector3f & |
avPosition, |
|
|
void * |
apUserData = NULL |
|
) |
| |
Adds a new node to the container.
- Parameters
-
&asName | Name of the node |
&avPosition | Position of the node. |
*apUserData | Data supplied by user. |
◆ GetNodeNum()
int hpl::cAINodeContainer::GetNodeNum |
( |
| ) |
const |
◆ GetNode()
cAINode* hpl::cAINodeContainer::GetNode |
( |
int |
alIdx | ) |
|
|
inline |
◆ GetNodeFromName()
cAINode* hpl::cAINodeContainer::GetNodeFromName |
( |
const tString & |
asName | ) |
|
Gets a node based on the name.
- Parameters
-
◆ Compile()
void hpl::cAINodeContainer::Compile |
( |
| ) |
|
◆ BuildNodeGridMap()
void hpl::cAINodeContainer::BuildNodeGridMap |
( |
| ) |
|
Build a grid map for nodes. (Used internally mostly)
◆ GetNodeIterator()
Returns a node iterator. Note that the radius is not checked, some nodes may lie outside.
- Parameters
-
- Returns
◆ FreePath()
Checks for a free path using the containers collide size.
- Parameters
-
&avStart | |
&avEnd | |
alRayNum | The max number of rays cast, -1 = maximum |
alFlags | Set Flags for the ray casting. |
apCallback | Check for every body and overrides alFlags. |
- Returns
◆ SetMaxEdges()
void hpl::cAINodeContainer::SetMaxEdges |
( |
int |
alX | ) |
|
|
inline |
Sets the max number of end node added to a node.
- Parameters
-
alX | The max number, -1 = unlimited |
◆ SetMinEdges()
void hpl::cAINodeContainer::SetMinEdges |
( |
int |
alX | ) |
|
|
inline |
Sets the min number of end node added to a node. This overrides max distance when needed.
◆ SetMaxEdgeDistance()
void hpl::cAINodeContainer::SetMaxEdgeDistance |
( |
float |
afX | ) |
|
|
inline |
Sets the max distance for an end node.
- Parameters
-
◆ SetNodeIsAtCenter()
void hpl::cAINodeContainer::SetNodeIsAtCenter |
( |
bool |
abX | ) |
|
|
inline |
When calculating if there is a free path between two nodes. Is the node position the center of the collider. If not the position is the feet position.
◆ SaveToFile()
void hpl::cAINodeContainer::SaveToFile |
( |
const tString & |
asFile | ) |
|
Saves all the node connections to file.
◆ LoadFromFile()
void hpl::cAINodeContainer::LoadFromFile |
( |
const tString & |
asFile | ) |
|
Loads all node connections from file. Only to be done after all nodes are loaded.
The documentation for this class was generated from the following file: