gwnavgeneration/generator/cellgeneratorprofiling.h Source File

cellgeneratorprofiling.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 
8 #pragma once
9 
10 
12 
13 
14 namespace Kaim
15 {
16 
17 
18 class CellGeneratorProfiling
19 {
20  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
21 
22 public:
23  CellGeneratorProfiling()
24  : m_enabled(false)
25  , m_rasterMs(0.0f)
26  , m_navRasterMs(0.0f)
27  , m_navRasterPaintingMs(0.0f)
28  , m_heightFieldMs(0.0f)
29  , m_boundariesMs(0.0f)
30  , m_navCellMs(0.0f)
31  {}
32 
33  KyFloat32* GetRasterMs() { return m_enabled ? &m_rasterMs : nullptr; }
34  KyFloat32* GetNavRasterMs() { return m_enabled ? &m_navRasterMs : nullptr; }
35  KyFloat32* GetNavRasterPaintingMs() { return m_enabled ? &m_navRasterPaintingMs : nullptr; }
36  KyFloat32* GetHeightFieldMs() { return m_enabled ? &m_heightFieldMs : nullptr; }
37  KyFloat32* GetBoundariesMs() { return m_enabled ? &m_boundariesMs : nullptr; }
38  KyFloat32* GetNavCellMs() { return m_enabled ? &m_navCellMs : nullptr; }
39 
40 public:
41  bool m_enabled;
42  KyFloat32 m_rasterMs;
43  KyFloat32 m_navRasterMs;
44  KyFloat32 m_navRasterPaintingMs;
45  KyFloat32 m_heightFieldMs;
46  KyFloat32 m_boundariesMs;
47  KyFloat32 m_navCellMs;
48 };
49 
50 
51 }
52 
53 
54 
#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