#include <ipather.h>
Definition at line 49 of file ipather.h.
virtual FIFE::IPather::~IPather |
( |
| ) |
|
|
inlinevirtual |
virtual bool FIFE::IPather::cancelSession |
( |
const int32_t |
sessionId | ) |
|
|
pure virtual |
Cancels a given session.
This function is called when (for instance) the user changes their mind about a destination while the agent is already moving, the old session needs to be cancelled and a new one created.
- Parameters
-
sessionId | The id of the session to cancel. |
- Returns
- A boolean to signify whether the session was successfully found and cancelled.
Implemented in FIFE::RoutePather.
Referenced by FIFE::ActionInfo::~ActionInfo().
virtual Route* FIFE::IPather::createRoute |
( |
const Location & |
start, |
|
|
const Location & |
end, |
|
|
bool |
immediate = false , |
|
|
const std::string & |
cost_id = "" |
|
) |
| |
|
pure virtual |
Creates a route between the start and end location that needs be solved.
- Parameters
-
start | A const reference to the start location. |
end | A const reference to the target location. |
immediate | A optional boolean, if true the route bypass the max. ticks limit and solves the path immediately, otherwise false. |
costId | A const reference to the string that holds the cost identifier. You can use it optional then this cost id is used instead of the default cost. |
Implemented in FIFE::RoutePather.
virtual bool FIFE::IPather::followRoute |
( |
const Location & |
current, |
|
|
Route * |
route, |
|
|
double |
speed, |
|
|
Location & |
nextLocation |
|
) |
| |
|
pure virtual |
Follows the path of the route.
- Parameters
-
current | A const reference to the current location. |
route | A pointer to the route which should be followed. |
speed | A double which holds the speed. |
nextLocation | A reference to the next location returned by the pather. |
- Returns
- A boolean, if true the route could be followed, otherwise false.
Implemented in FIFE::RoutePather.
Referenced by FIFE::Instance::processMovement().
virtual int32_t FIFE::IPather::getMaxTicks |
( |
| ) |
|
|
pure virtual |
Returns maximal ticks (update steps) to solve routes.
- See Also
- update()
- Returns
- A integer which holds the steps. default is 1000
Implemented in FIFE::RoutePather.
virtual std::string FIFE::IPather::getName |
( |
| ) |
const |
|
pure virtual |
virtual void FIFE::IPather::setMaxTicks |
( |
int32_t |
ticks | ) |
|
|
pure virtual |
Sets maximal ticks (update steps) to solve routes.
- See Also
- update()
- Parameters
-
ticks | A integer which holds the steps. default is 1000 |
Implemented in FIFE::RoutePather.
virtual bool FIFE::IPather::solveRoute |
( |
Route * |
route, |
|
|
int32_t |
priority = MEDIUM_PRIORITY , |
|
|
bool |
immediate = false |
|
) |
| |
|
pure virtual |
Solves the route to create a path.
- Parameters
-
route | A pointer to the route which should be solved. |
priority | The priority to assign to search (high are pushed to the front of the queue). |
- See Also
- PriorityType
- Parameters
-
immediate | A optional boolean, if true the route bypass the max. ticks limit and solves the path immediately, otherwise false. |
- Returns
- A boolean, if true the route could be solved, otherwise false.
Implemented in FIFE::RoutePather.
Referenced by FIFE::Instance::move(), and FIFE::Instance::processMovement().
virtual void FIFE::IPather::update |
( |
| ) |
|
|
pure virtual |
Updates the pather (should it need updating).
The update method is called by the model. Pathfinders which require per loop updating (in the case of pathfinders which implement A* for instance) should use this method as an oppurtunity to update the search. Generally the method should be constrained to a maximum amount of search updating to prevent this method from stalling the application.
Implemented in FIFE::RoutePather.
The documentation for this class was generated from the following file: