Kaim::TraverseLogicWithCostPerTriangle< TCanEnterNavTagMode > Class Template Reference

#include <traverselogic.h>

Class Description

template<class TCanEnterNavTagMode>
class Kaim::TraverseLogicWithCostPerTriangle< TCanEnterNavTagMode >

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...
 

Member Function Documentation

template<class TCanEnterNavTagMode >
static bool Kaim::TraverseLogicWithCostPerTriangle< TCanEnterNavTagMode >::CanEnterNavTag ( void *  ,
const NavTag &  ,
const NavTag &  ,
const Vec3f  
)
inlinestatic

Called if TCanEnterNavTagMode==LogicDoUseCanEnterNavTag. Must return true when traversing from exitNavTag to enterNavTag at position pos is allowed.

template<class TCanEnterNavTagMode >
static bool Kaim::TraverseLogicWithCostPerTriangle< TCanEnterNavTagMode >::CanTraverseNavGraphEdge ( void *  ,
const NavGraphEdgeRawPtr ,
KyFloat32  
)
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).

template<class TCanEnterNavTagMode >
static bool Kaim::TraverseLogicWithCostPerTriangle< TCanEnterNavTagMode >::CanTraverseNavTriangle ( void *  ,
const NavTriangleRawPtr ,
KyFloat32  
)
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).

template<class TCanEnterNavTagMode >
static KyFloat32 Kaim::TraverseLogicWithCostPerTriangle< TCanEnterNavTagMode >::GetHeuristicFromDistanceToDest ( void *  ,
KyFloat32  distance3dToDestination 
)
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.


The documentation for this class was generated from the following file: