|
CartoType API
|
#include <cartotype_router.h>
Public Member Functions | |
| CT_IMPORT | CRouter (CRouterInfo &aRouterInfo, const TPoint &aStart, const TPoint &aEnd) |
| CT_IMPORT TResult | CalculateRoute () |
| CT_IMPORT bool | CalculateRouteStep (TResult &aError) |
| int32 | RouteNodes () const |
| const CNode * | RouteNode (int32 aIndex) const |
| CT_IMPORT COutline * | CreateRouteOutline (TResult &aError) |
| CT_IMPORT CRoute * | CreateRoute (TResult &aError) |
The router. It calculates routes through cyclic directed graphs using data supplied by an abstract interface. It uses the A-star algorithm.
A router object can be used incrementally as part of a cooperative multitasking system by calling CalculateRouteStep repeatedly.
| CT_EXPORT CRouter::CRouter | ( | CRouterInfo & | aRouterInfo, |
| const TPoint & | aStart, | ||
| const TPoint & | aEnd | ||
| ) |
Create a router object that gets its nodes and arcs from aRouterInfo.
| CT_EXPORT TResult CRouter::CalculateRoute | ( | ) |
Calculate the route.
| CT_EXPORT bool CRouter::CalculateRouteStep | ( | TResult & | aError | ) |
Perform another route calculation step. Return false if there is nothing more to be done or if an error has occurred.
Create a CRoute object giving information about a route that has already been calculated.
Create an outline containing the current route if any.
1.7.5.1