gwnavgeneration/generator/intermediatefilesconfig.h Source File

intermediatefilesconfig.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 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 // primary contact: GUAL - secondary contact: NOBODY
9 #ifndef GwNavGen_IntermediateFilesConfig_H
10 #define GwNavGen_IntermediateFilesConfig_H
11 
12 
16 
17 namespace Kaim
18 {
19 
20 
24 {
25  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_NavDataGen)
26 public:
28 
29  // Add a CellPos for which we generate intermediate files
30  void Add(const CellPos& pos) { m_cellsPositions.PushBack(pos); }
31 
32  bool DoesContain(const CellPos& pos) const { return m_cellsPositions.DoesContain(pos); }
33  void Clear() { m_cellsPositions.Clear(); }
34  KyUInt32 GetCount() const { return m_cellsPositions.GetCount(); }
35  const CellPos& Get(KyUInt32 index) const { return m_cellsPositions[index]; }
36 
38  bool IsEnabled() const {return m_cellsPositions.GetCount() != 0; }
39 
40  String GetFileName_RasterCell(const CellPos& cellPos) const { return GetFileName(cellPos, "RasterCell"); }
41  String GetFileName_NavRasterCell(const CellPos& cellPos) const { return GetFileName(cellPos, "NavRasterCell"); }
42  String GetFileName_BoundaryGraphCell(const CellPos& cellPos) const { return GetFileName(cellPos, "BoundaryGraphCell"); }
43 
44 private:
46  String GetFileName(const CellPos& cellPos, const String& extension) const;
47 
48 public:
49  KyArray<CellPos> m_cellsPositions; // Write intermediate files for these cell positions
50 };
51 
52 
53 } // namespace Kaim
54 
55 #endif
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:33
bool IsEnabled() const
Returns true if at least one intermediate file is to be created.
Definition: intermediatefilesconfig.h:39
This class defines a two-dimensional vector whose coordinates are stored using 32-bit integers...
Definition: vec2i.h:26
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
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...
The IntermediateFilesConfig class is used by GeneratorRunOptions to store configuration parameters th...
Definition: intermediatefilesconfig.h:23
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36