#include <traverselogic.h>
TraverseLogicWithCostPerTriangle defines the functions called when cost customization is per primitive i.e.
NavTriangle and NavGraphEdge. WARNING: This is for advanced usage only, the tessellation of you NavMesh should be dense enough to get a correct behavior.
Static Public Member Functions | |
static bool | CanTraverseNavTriangle (void *, const NavTriangleRawPtr &, KyFloat32 *) |
Must return true if triangle is allowed. More... | |
static bool | CanTraverseNavGraphEdge (void *, const NavGraphEdgeRawPtr &, KyFloat32 *) |
Must return true if graphEdge is allowed. More... | |
static KyFloat32 | GetHeuristicFromDistanceToDest (void *, KyFloat32 distance3dToDestination) |
Called for each node in AstarQuery. More... | |
static bool | CanEnterNavTag (void *, const NavTag &, const NavTag &, const Vec3f &) |
Called if TCanEnterNavTagMode==LogicDoUseCanEnterNavTag. Must return true when traversing from exitNavTag to enterNavTag at position pos is allowed. More... | |
|
inlinestatic |
Called if TCanEnterNavTagMode==LogicDoUseCanEnterNavTag. Must return true when traversing from exitNavTag to enterNavTag at position pos is allowed.
|
inlinestatic |
Must return true if graphEdge is allowed.
Must also set *costMultiplier to set a custom cost. costMultiplier will be later multiplied by the path edge distance to get the actual cost. costMultiplier may be nullptr when costMultiplier is not required (ex CanGoQuery).
|
inlinestatic |
Must return true if triangle is allowed.
Must also set *costMultiplier to set a custom cost. costMultiplier will be later multiplied by the traversed distance to get the actual cost. costMultiplier may be nullptr when costMultiplier is not required (ex CanGoQuery).
|
inlinestatic |
Called for each node in AstarQuery.
Must return the estimated cost of the path from the current position to the destination. The returned cost must always under-estimate the actual cost of the path. So if you are using costMultiplier < 1.0f then this should return distance3DToDestination * yourMinimumCostMultiplier.