gwnavgeneration/input/sectorinputdata.h Source File

sectorinputdata.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_SectorInputData_H
10 #define GwNavGen_SectorInputData_H
11 
12 
15 
16 
17 namespace Kaim
18 {
19 
20 class GeneratorSystem;
21 class ClientInputConsumer;
22 class GeneratorSectorBuilder;
23 
24 
27 class InputTileImprint : public RefCountBase<InputTileImprint, MemStat_NavDataGen>
28 {
29 public:
30  InputTileImprint() {} // To make KyArray happy
31 
32  InputTileImprint(GeneratorSectorBuilder* sectorBuilder, const TilePos& tilePos)
33  : m_sectorBuilder(sectorBuilder), m_tilePos(tilePos) {}
34 
35 public:
36  GeneratorSectorBuilder* m_sectorBuilder;
37  TilePos m_tilePos;
38  KyArray<CellPos> m_cellPositions;
39 };
40 
41 
45 class SectorInputData
46 {
47  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_NavDataGen)
49 
50 public:
51  SectorInputData() : m_sys(KY_NULL), m_sectorBuilder(KY_NULL) {}
52 
53  // called at the end GeneratorSectorBuilder::ProduceInputs() via inputConsumer.FinalizeSectorInput(m_sectorInput);
54  KyResult Init(GeneratorSectorBuilder* sectorBuilder, ClientInputConsumer& inputConsumer);
55 
56 private:
57  KyResult Init_NoInputTiling(ClientInputConsumer& inputConsumer);
58  KyResult Init_WithInputTiling(ClientInputConsumer& inputConsumer);
59  void RegisterCellPos(const CellPos& cellPos);
60 
61 public:
62  GeneratorSystem* m_sys;
63  GeneratorSectorBuilder* m_sectorBuilder;
64 
65  // No InputTiling => InputCellBlob are aggregated directly in SectorInput
66  KyArray<Ptr<BlobHandler<InputCellBlob> > > m_inputCellHandlers;
67 
68  // InputTiling activated => InputCellBlob are saved to files
69  // we only keep in memory the cellPos imprints of each inputTile
70  KyArray<Ptr<InputTileImprint> > m_inputTileImprints;
71 };
72 
73 
74 
75 }
76 
77 
78 #endif
79 
The ClientInputConsumer class is one of the primary components of the NavData generation system...
Definition: clientinputconsumer.h:67
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
Maintains generation data for each sector.
Definition: generatorsectorbuilder.h:41
GeneratorSystem gathers everything that is global across a generation: configuration, options...
Definition: generatorsystem.h:46
General purpose array for movable objects that require explicit construction/destruction.
Definition: kyarray.h:118
#define KY_NULL
Null value.
Definition: types.h:247
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Relevant if m_doEnableLimitedMemoryMode is true, maintains the per InputTile information that will al...
Definition: sectorinputdata.h:27
Maintains the InputCellBlobs spatialized per CellPos for 1 SectorInput.
Definition: sectorinputdata.h:49
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