gwnavgeneration/input/sectorinputdata.h Source File

sectorinputdata.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 
13 
14 
15 namespace Kaim
16 {
17 
18 class GeneratorSystem;
19 class ClientInputConsumer;
20 class GeneratorSectorBuilder;
21 
22 
25 class InputTileImprint : public RefCountBase<InputTileImprint, MemStat_NavDataGen>
26 {
27 public:
28  InputTileImprint() {} // To make KyArray happy
29 
30  InputTileImprint(GeneratorSectorBuilder* sectorBuilder, const TilePos& tilePos)
31  : m_sectorBuilder(sectorBuilder), m_tilePos(tilePos) {}
32 
33 public:
34  GeneratorSectorBuilder* m_sectorBuilder;
35  TilePos m_tilePos;
36  KyArray<CellPos> m_cellPositions;
37 };
38 
39 
44 {
45  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_NavDataGen)
47 
48 public:
49  SectorInputData() : m_sys(nullptr), m_sectorBuilder(nullptr) {}
50 
51  // called at the end GeneratorSectorBuilder::ProduceInputs() via inputConsumer.FinalizeSectorInput(m_sectorInput);
52  KyResult Init(GeneratorSectorBuilder* sectorBuilder, ClientInputConsumer& inputConsumer);
53 
54 private:
55  KyResult Init_NoInputTiling(ClientInputConsumer& inputConsumer);
56  KyResult Init_WithInputTiling(ClientInputConsumer& inputConsumer);
57  void RegisterCellPos(const CellPos& cellPos);
58 
59 public:
60  GeneratorSystem* m_sys;
61  GeneratorSectorBuilder* m_sectorBuilder;
62 
63  // No InputTiling => InputCellBlob are aggregated directly in SectorInput
64  KyArray<Ptr<BlobHandler<InputCellBlob> > > m_inputCellHandlers;
65 
66  // InputTiling activated => InputCellBlob are saved to files
67  // we only keep in memory the cellPos imprints of each inputTile
68  KyArray<Ptr<InputTileImprint> > m_inputTileImprints;
69 };
70 
71 
72 
73 }
74 
75 
76 
The ClientInputConsumer class is one of the primary components of the NavData generation system...
Definition: clientinputconsumer.h:62
Maintains generation data for each sector.
Definition: generatorsectorbuilder.h:39
GeneratorSystem gathers everything that is global across a generation: configuration, options...
Definition: generatorsystem.h:45
General purpose array for movable objects that require explicit construction/destruction.
Definition: kyarray.h:162
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
Relevant if m_doEnableLimitedMemoryMode is true, maintains the per InputTile information that will al...
Definition: sectorinputdata.h:25
Maintains the InputCellBlobs spatialized per CellPos for 1 SectorInput.
Definition: sectorinputdata.h:43
Navigation return code class.
Definition: types.h:108
2d vector using KyInt32
Definition: vec2i.h:18
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17