List of all members.
Public Member Functions
|virtual float||LeastCostEstimate (void *stateStart, void *stateEnd)=0|
|virtual void||AdjacentCost (void *state, std::vector< micropather::StateCost > *adjacent)=0|
|virtual void||PrintStateInfo (void *state)=0|
The notion of a "state" is very important. It must have the following properties:
If the client application represents states as objects, then the state is usually just the object cast to a void*. If the client application sees states as numerical values, (x,y) for example, then state is an encoding of these values. MicroPather never interprets or modifies the value of state.
|virtual float micropather::Graph::LeastCostEstimate||(||void *||stateStart,|
Return the least possible cost between 2 states. For example, if your pathfinding is based on distance, this is simply the straight distance between 2 points on the map. If you pathfinding is based on minimum time, it is the minimal travel time between 2 points given the best possible terrain.
|virtual void micropather::Graph::AdjacentCost||(||void *||state,|
|std::vector< micropather::StateCost > *||adjacent|
Return the exact cost from the given state to all its neighboring states. This may be called multiple times, or cached by the solver. It *must* return the same exact values for every call to MicroPather::Solve(). It should generally be a simple, fast function with no callbacks into the pather.
|virtual void micropather::Graph::PrintStateInfo||(||void *||state||)||
This function is only used in DEBUG mode - it dumps output to stdout. Since void* aren't really human readable, normally you print out some concise info (like "(1,2)") without an ending newline.