gwnavgeneration/navmesh/dynamicnavfloorheightfield.h Source File
Go to the documentation of this file.
9 #ifndef GwNavGen_DynamicNavFloorHeightField_H
10 #define GwNavGen_DynamicNavFloorHeightField_H
21 class GeneratorSystem;
22 class DynamicRasterCell;
25 enum NavFloorHeightFieldErrorUpdateStatus
27 NavFloorHeightFieldErrorStatus_Updated,
28 NavFloorHeightFieldErrorStatus_NoProjections
31 enum NavFloorHeightFieldPointStatus
33 NavFloorHeightFieldPointStatus_Valid,
34 NavFloorHeightFieldPointStatus_Disabled
37 struct NavFloorHeightFieldPoint
39 NavFloorHeightFieldPoint()
44 m_status(NavFloorHeightFieldPointStatus_Valid) {}
46 NavFloorHeightFieldPoint(
const Vec2f& position2D,
KyFloat32 alt)
51 m_status(NavFloorHeightFieldPointStatus_Valid){}
53 bool operator == (
const NavFloorHeightFieldPoint& other)
56 bool same = other.m_pos == m_pos
57 && other.m_maxLocalAlt == m_maxLocalAlt
58 && other.m_minLocalAlt == m_minLocalAlt;
68 NavFloorHeightFieldPointStatus m_status;
74 class DynamicNavFloorHeightField
78 DynamicNavFloorHeightField(GeneratorSystem* sys,
KyInt32 originalPixelSize,
KyInt32 stride, const PixelBox& navPixelBox);
80 void AddPoint(const PixelPos& coord,
KyFloat32 alt);
81 NavFloorHeightFieldErrorUpdateStatus UpdateErrors(const DynamicRasterCell* rasterCell);
82 NavFloorHeightFieldPoint* GetWorstErrorPoint();
83 NavFloorHeightFieldPoint* GetPointAtLocalHeightFieldPos(const PixelPos& pos);
84 NavFloorHeightFieldPoint* GetPointAtAbsoluteHeightFieldPos(const PixelPos& pos);
87 GeneratorSystem* m_sys;
90 PixelBox m_navPixelBox;
91 PixelBox m_heightFieldPixelBox;
92 PixelBox m_heightFieldBoundingPixelBox;
93 KyArrayTLS<NavFloorHeightFieldPoint> m_points;
100 #endif //GwNavGen_DynamicNavFloor_H
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
int KyInt32
Type used internally to represent a 32-bit integer.
Definition: types.h:35
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