gwnavgeneration/generator/generatorprofiling.h Source File
Go to the documentation of this file.
10 #ifndef GwNavGen_GeneratorProfiling_H
11 #define GwNavGen_GeneratorProfiling_H
28 CellProfiling() : m_totalMs(0.0f) {}
32 m_totalMs += milliseconds;
34 if (milliseconds > m_maxMs)
36 m_maxMs = milliseconds;
37 m_maxCellPos = cellPos;
48 template <
class OSTREAM>
49 inline OSTREAM& operator<<(OSTREAM& os,
const Kaim::CellProfiling& c)
51 os <<
" total(s)=" << c.m_totalMs * 0.001f <<
" max(ms)=" << c.m_maxMs <<
" @ " << c.m_maxCellPos;
56 class GeneratorProfiling
61 GeneratorProfiling() {}
63 void Integrate(
const CellGeneratorProfiling& cellProfiling,
const CellPos& cellPos)
65 m_raster.Integrate( cellProfiling.m_rasterMs , cellPos);
66 m_navRaster.Integrate( cellProfiling.m_navRasterMs , cellPos);
67 m_navRasterPainting.Integrate(cellProfiling.m_navRasterPaintingMs, cellPos);
68 m_heightField.Integrate( cellProfiling.m_heightFieldMs , cellPos);
69 m_boundaries.Integrate( cellProfiling.m_boundariesMs , cellPos);
70 m_navCell.Integrate( cellProfiling.m_navCellMs , cellPos);
74 CellProfiling m_raster;
75 CellProfiling m_navRaster;
76 CellProfiling m_navRasterPainting;
77 CellProfiling m_heightField;
78 CellProfiling m_boundaries;
79 CellProfiling m_navCell;
83 template<
class OSTREAM>
84 inline OSTREAM& operator<<(OSTREAM& os,
const GeneratorProfiling& profiling)
86 os << KY_LOG_SMALL_TITLE_BEGIN(
"",
"Generator Profiling");
87 os <<
"raster " << profiling.m_raster << Endl;
88 os <<
"navRaster " << profiling.m_navRaster << Endl;
89 os <<
"navRasterPainting " << profiling.m_navRasterPainting << Endl;
90 os <<
"heightField " << profiling.m_heightField << Endl;
91 os <<
"boundaries " << profiling.m_boundaries << Endl;
92 os <<
"navCellBlob " << profiling.m_navCell << Endl;
93 os << KY_LOG_SMALL_TITLE_END(
"",
"Generator Profiling");
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:33
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43