gwnavruntime/navmesh/itrianglecostmap.h Source File
Go to the documentation of this file.
9 #ifndef Navigation_TriangleCostMap_H
10 #define Navigation_TriangleCostMap_H
22 #include "gwnavruntime/math/box2iiterator.h"
30 class ActiveNavFloorCollection;
31 class NavTriangleRawPtr;
32 class TriangleCostInCell;
36 class ITriangleCostMap :
public RefCountBase<ITriangleCostMap, MemStat_CostMap>
41 virtual ~ITriangleCostMap();
48 virtual
void Recompute() = 0;
60 template<class CostMultiplierComputer>
61 void InitAndBrowseAllTrianglesInBox3f(CostMultiplierComputer& compute, const Box3f& aabb);
77 template<class CostMultiplierComputer>
78 void InitAndPropagateInTrianglesFromPosInVolume(CostMultiplierComputer& compute, const Box3f& aabb, const Vec3f& inputPosition);
81 void BindToDatabase(Database* database);
82 void UnbindFromDatabase();
83 bool IsBindToADatabase()
const {
return m_database !=
KY_NULL; }
85 void SetCostMultiplier(
const NavTriangleRawPtr& triangle,
KyFloat32 costMultiplier);
86 KyFloat32 GetCostMultiplier(
const NavTriangleRawPtr& triangle)
const;
88 const CellBox& GetCellBox()
const {
return m_cellBox; }
94 bool InitCostMapForBox3f(
const Box3f& aabb);
97 bool DoesNavFloorIntersectBox3f(NavFloor* navFloor,
const Box3f& aabb)
const;
100 Database* m_database;
101 char* m_bufferOfCostsInCell;
107 void InitFromNewCellBox();
109 void InitBuffer(
KyUInt32 newElementCount);
111 void AllocateMemory(
KyUInt32 newElementCount);
112 void ReleaseMemory();
115 KyUInt32 GetIndexInCollection()
const {
return m_indexInCollection; }
116 void SetIndexInCollection(
KyUInt32 indexInCollection) { m_indexInCollection = indexInCollection; }
Box2i CellBox
A type that represents a bounding box around cells in a 2D grid.
Definition: navmeshtypes.h:34
#define KY_NULL
Null value.
Definition: types.h:247
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43