gwnavgeneration/generator/intermediatefilesconfig.h Source File

intermediatefilesconfig.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 #pragma once
8 
12 
13 namespace Kaim
14 {
15 
19 {
20  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_NavDataGen)
21 public:
23 
24  // Add a CellPos for which we generate intermediate files
25  void Add(const CellPos& pos) { m_cellsPositions.PushBack(pos); }
26 
27  bool DoesContain(const CellPos& pos) const { return m_cellsPositions.DoesContain(pos); }
28  void Clear() { m_cellsPositions.Clear(); }
29  KyUInt32 GetCount() const { return m_cellsPositions.GetCount(); }
30  const CellPos& Get(KyUInt32 index) const { return m_cellsPositions[index]; }
31 
33  bool IsEnabled() const {return m_cellsPositions.GetCount() != 0; }
34 
35  String GetFileName_RasterCell(const CellPos& cellPos) const { return GetFileName(cellPos, "RasterCell"); }
36  String GetFileName_NavRasterCell(const CellPos& cellPos) const { return GetFileName(cellPos, "NavRasterCell"); }
37  String GetFileName_BoundaryGraphCell(const CellPos& cellPos) const { return GetFileName(cellPos, "BoundaryGraphCell"); }
38 
39 private:
41  String GetFileName(const CellPos& cellPos, const String& extension) const;
42 
43 public:
44  KyArray<CellPos> m_cellsPositions; // Write intermediate files for these cell positions
45 };
46 
47 } // namespace Kaim
48 
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:30
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
bool IsEnabled() const
Returns true if at least one intermediate file is to be created.
Definition: intermediatefilesconfig.h:33
2d vector using KyInt32
Definition: vec2i.h:18
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
String GetFileName(const CellPos &cellPos, const String &extension) const
Returns the actual file name that should be used for the file that corresponds to the cellPos cell...
Definition: intermediatefilesconfig.cpp:13
The IntermediateFilesConfig class is used by GeneratorRunOptions to store configuration parameters th...
Definition: intermediatefilesconfig.h:18