gwnavgeneration/generator/generatorprofiling.h Source File
Go to the documentation of this file.
26 CellProfiling() : m_totalMs(0.0f) {}
30 m_totalMs += milliseconds;
32 if (milliseconds > m_maxMs)
34 m_maxMs = milliseconds;
35 m_maxCellPos = cellPos;
46 template <
class OSTREAM>
47 inline OSTREAM& operator<<(OSTREAM& os,
const Kaim::CellProfiling& c)
49 os <<
" total(s)=" << c.m_totalMs * 0.001f <<
" max(ms)=" << c.m_maxMs <<
" @ " << c.m_maxCellPos;
54 class GeneratorProfiling
59 GeneratorProfiling() {}
61 void Integrate(
const CellGeneratorProfiling& cellProfiling,
const CellPos& cellPos)
63 m_raster.Integrate( cellProfiling.m_rasterMs , cellPos);
64 m_navRaster.Integrate( cellProfiling.m_navRasterMs , cellPos);
65 m_navRasterPainting.Integrate(cellProfiling.m_navRasterPaintingMs, cellPos);
66 m_heightField.Integrate( cellProfiling.m_heightFieldMs , cellPos);
67 m_boundaries.Integrate( cellProfiling.m_boundariesMs , cellPos);
68 m_navCell.Integrate( cellProfiling.m_navCellMs , cellPos);
72 CellProfiling m_raster;
73 CellProfiling m_navRaster;
74 CellProfiling m_navRasterPainting;
75 CellProfiling m_heightField;
76 CellProfiling m_boundaries;
77 CellProfiling m_navCell;
81 template<
class OSTREAM>
82 inline OSTREAM& operator<<(OSTREAM& os,
const GeneratorProfiling& profiling)
84 os << KY_LOG_SMALL_TITLE_BEGIN(
"",
"Generator Profiling");
85 os <<
"raster " << profiling.m_raster << Endl;
86 os <<
"navRaster " << profiling.m_navRaster << Endl;
87 os <<
"navRasterPainting " << profiling.m_navRasterPainting << Endl;
88 os <<
"heightField " << profiling.m_heightField << Endl;
89 os <<
"boundaries " << profiling.m_boundaries << Endl;
90 os <<
"navCellBlob " << profiling.m_navCell << Endl;
91 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:30
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
float KyFloat32
float
Definition: types.h:32