PathEngine home previous: iTerrainCallBack::getHeightAtWithPrecision()next: iQueryCallBack::abort()
Contents, API Reference, Interfaces, iQueryCallBack

Interface iQueryCallBack

Description

The client application creates objects deriving from this interface to pass into query methods such as iMesh::findShortestPath_WithQueryCallBack(), to enable the query to be aborted early.

PathEngine will call back to the abort() method periodically during the search.
If this abort() method returns true at any point then the search will be aborted and the best path found so far returned.

The desiredCallBackFrequency() method is called once at the start of each query, to determine how often the abort() method should be polled.

Refer to Aborting Pathfinding Early for more details about using the query callback mechanism.

Defined in SDKRoot/code/externalAPI/i_pathengine.h.

class iQueryCallBack
{
public:
    virtual ~iQueryCallBack()
    {
    }
    virtual int32_t desiredCallBackFrequency() = 0;
    virtual bool abort() = 0;
};
        

The virtual destructor is included just for good general programming practice.
Destruction remains the responsibility of the client application - PathEngine will not call this virtual destructor.

Methods:

abort

PathEngine calls back to this method during a pathfinding query to determine whether the query should be aborted.

desiredCallBackFrequency

This method is called by PathEngine at the start of each query to determine how often the abort() method should be polled.


Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iQueryCallBack::abort()