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

#include <AIPathfind.h>

Inherited by Pathfinder [private].

Public Member Functions

virtual PathfindPath (Object *obj, const LocomotorSet &locomotorSet, const Coord3D *from, const Coord3D *to)=0
 Find a short, valid path between given locations.
 
virtual PathfindClosestPath (Object *obj, const LocomotorSet &locomotorSet, const Coord3D *from, Coord3D *to, Bool blocked, Real pathCostMultiplier, Bool moveAllies)=0
 
virtual PathfindAttackPath (const Object *obj, const LocomotorSet &locomotorSet, const Coord3D *from, const Object *victim, const Coord3D *victimPos, const Weapon *weapon)=0
 
virtual PathpatchPath (const Object *obj, const LocomotorSet &locomotorSet, Path *originalPath, Bool blocked)=0
 
virtual PathfindSafePath (const Object *obj, const LocomotorSet &locomotorSet, const Coord3D *from, const Coord3D *repulsorPos1, const Coord3D *repulsorPos2, Real repulsorRadius)=0
 

Detailed Description

The pathfinding services interface provides access to the 3 expensive path find calls: findPath, findClosestPath, and findAttackPath. It is only available to units when their ai interface doPathfind method is called. This allows the pathfinder to spread out the pathfinding over a number of frames when a lot of units are trying to pathfind all at the same time.

Definition at line 564 of file AIPathfind.h.

Member Function Documentation

◆ findAttackPath()

virtual Path * PathfindServicesInterface::findAttackPath ( const Object * obj,
const LocomotorSet & locomotorSet,
const Coord3D * from,
const Object * victim,
const Coord3D * victimPos,
const Weapon * weapon )
pure virtual

Find a short, valid path to a location that obj can attack victim from.

◆ findClosestPath()

virtual Path * PathfindServicesInterface::findClosestPath ( Object * obj,
const LocomotorSet & locomotorSet,
const Coord3D * from,
Coord3D * to,
Bool blocked,
Real pathCostMultiplier,
Bool moveAllies )
pure virtual

Find a short, valid path to a location NEAR the to location. This succeds when the destination is unreachable (like inside a building). If the destination is unreachable, it will adjust the to point.

◆ findPath()

virtual Path * PathfindServicesInterface::findPath ( Object * obj,
const LocomotorSet & locomotorSet,
const Coord3D * from,
const Coord3D * to )
pure virtual

Find a short, valid path between given locations.

◆ findSafePath()

virtual Path * PathfindServicesInterface::findSafePath ( const Object * obj,
const LocomotorSet & locomotorSet,
const Coord3D * from,
const Coord3D * repulsorPos1,
const Coord3D * repulsorPos2,
Real repulsorRadius )
pure virtual

Find a short, valid path to a location that is away from the repulsors.

◆ patchPath()

virtual Path * PathfindServicesInterface::patchPath ( const Object * obj,
const LocomotorSet & locomotorSet,
Path * originalPath,
Bool blocked )
pure virtual

Patch to the exiting path from the current position, either because we became blocked, or because we had to move off the path to avoid other units.


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