Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
PathNode Class Reference

#include <AIPathfind.h>

Inherits MemoryPoolObject.

Public Member Functions

 PathNode ()
 
Coord3DgetPosition (void)
 return position of this node
 
const Coord3DgetPosition (void) const
 return position of this node
 
void setPosition (const Coord3D *pos)
 set the position of this path node
 
const Coord3DcomputeDirectionVector (void)
 compute direction to next node
 
PathNodegetNext (void)
 return next node in the path
 
PathNodegetPrevious (void)
 return previous node in the path
 
const PathNodegetNext (void) const
 return next node in the path
 
const PathNodegetPrevious (void) const
 return previous node in the path
 
PathfindLayerEnum getLayer (void) const
 return layer of this node.
 
void setLayer (PathfindLayerEnum layer)
 set the layer of this path node
 
void setNextOptimized (PathNode *node)
 
PathNodegetNextOptimized (Coord2D *dir=NULL, Real *dist=NULL)
 
const PathNodegetNextOptimized (Coord2D *dir=NULL, Real *dist=NULL) const
 < return next node in optimized path
 
void setCanOptimize (Bool canOpt)
 
Bool getCanOptimize (void) const
 
PathNodeprependToList (PathNode *list)
 given a list, prepend this node, return new list
 
PathNodeappendToList (PathNode *list)
 
void append (PathNode *list)
 given a node, append to this node
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Public Attributes

Int m_id
 

Additional Inherited Members

- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

PathNodes are used to create a final Path to return from the pathfinder. Note that these are not used during the A* search.

Definition at line 63 of file AIPathfind.h.

Constructor & Destructor Documentation

◆ PathNode()

PathNode::PathNode ( )

Definition at line 119 of file AIPathfind.cpp.

Member Function Documentation

◆ append()

void PathNode::append ( PathNode * list)

given a node, append to this node

given a node, append new node to this.

Definition at line 197 of file AIPathfind.cpp.

◆ appendToList()

PathNode * PathNode::appendToList ( PathNode * list)

given a list, append this node, return new list. slow implementation.

Todo
optimize this

given a list, append this node, return new list. slow implementation.

Todo
optimize this

Definition at line 175 of file AIPathfind.cpp.

◆ computeDirectionVector()

const Coord3D * PathNode::computeDirectionVector ( void )

compute direction to next node

Compute direction vector to next node

Definition at line 212 of file AIPathfind.cpp.

◆ getCanOptimize()

Bool PathNode::getCanOptimize ( void ) const
inline

Definition at line 103 of file AIPathfind.h.

◆ getLayer()

PathfindLayerEnum PathNode::getLayer ( void ) const
inline

return layer of this node.

Definition at line 79 of file AIPathfind.h.

◆ getNext() [1/2]

PathNode * PathNode::getNext ( void )
inline

return next node in the path

Definition at line 74 of file AIPathfind.h.

◆ getNext() [2/2]

const PathNode * PathNode::getNext ( void ) const
inline

return next node in the path

Definition at line 76 of file AIPathfind.h.

◆ getNextOptimized() [1/2]

PathNode * PathNode::getNextOptimized ( Coord2D * dir = NULL,
Real * dist = NULL )
inline
Parameters
distreturn next node in optimized path

Definition at line 84 of file AIPathfind.h.

◆ getNextOptimized() [2/2]

const PathNode * PathNode::getNextOptimized ( Coord2D * dir = NULL,
Real * dist = NULL ) const
inline

< return next node in optimized path

Definition at line 93 of file AIPathfind.h.

◆ getPosition() [1/2]

Coord3D * PathNode::getPosition ( void )
inline

return position of this node

Definition at line 68 of file AIPathfind.h.

◆ getPosition() [2/2]

const Coord3D * PathNode::getPosition ( void ) const
inline

return position of this node

Definition at line 69 of file AIPathfind.h.

◆ getPrevious() [1/2]

PathNode * PathNode::getPrevious ( void )
inline

return previous node in the path

Definition at line 75 of file AIPathfind.h.

◆ getPrevious() [2/2]

const PathNode * PathNode::getPrevious ( void ) const
inline

return previous node in the path

Definition at line 77 of file AIPathfind.h.

◆ prependToList()

PathNode * PathNode::prependToList ( PathNode * list)

given a list, prepend this node, return new list

Definition at line 163 of file AIPathfind.cpp.

◆ setCanOptimize()

void PathNode::setCanOptimize ( Bool canOpt)
inline

Definition at line 102 of file AIPathfind.h.

◆ setLayer()

void PathNode::setLayer ( PathfindLayerEnum layer)
inline

set the layer of this path node

Definition at line 80 of file AIPathfind.h.

◆ setNextOptimized()

void PathNode::setNextOptimized ( PathNode * node)

Definition at line 139 of file AIPathfind.cpp.

◆ setPosition()

void PathNode::setPosition ( const Coord3D * pos)
inline

set the position of this path node

Definition at line 70 of file AIPathfind.h.

Member Data Documentation

◆ m_id

Int PathNode::m_id
mutable

Definition at line 116 of file AIPathfind.h.


The documentation for this class was generated from the following files: