gwnavgeneration/input/clientinput.h Source File

clientinput.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 // primary contact: LASI - secondary contact: NOBODY
8 #ifndef GwNavGen_ClientInput_H
9 #define GwNavGen_ClientInput_H
10 
11 
18 
19 
20 namespace Kaim
21 {
22 
23 class GeneratorSystem;
24 class File;
25 class FileOpenerBase;
26 
31 {
32  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
34 
35 public:
36  // ---------------------------------- Constructor and destructor ----------------------------------
38  ~ClientInput() { Clear(); }
39  void Clear();
40 
41  // ---------------------------------- Accessors ----------------------------------
42  const KyGuid* GetGuid() const;
43  KyUInt32 GetDatabaseIndex() const { return m_sectorDescriptor.m_databaseIndex; }
44 
45  // ---------------------------------- Save and Load from file ----------------------------------
46  KyResult Save(const char* fullFileName);
47  KyResult Load(const char* fullFileName, FileOpenerBase* fileOpener);
48 
49  // ---------------------------------- Internals ----------------------------------
50  void Init(GeneratorSystem* sys);
51  void InitFromDynamicClientInputChunk(GeneratorSystem* sys, const DynamicClientInputChunk& dynamicClientInputChunk);
52 
53  Kaim::Box3f ComputeTrianglesBoundingBox();
54 
55 private:
56  KyResult Load(File* file);
57 
59  KyResult LoadParts(const char* fullFileName, FileOpenerBase* fileOpener);
60 
61 public:
64 
65  GeneratorAbstractGraphParameters m_abstractGraphParams;
66 
69 
70  // Information about the sector (databaseIndex)
71  ClientInputSectorDescriptor m_sectorDescriptor;
72 
73  KyArray< Ptr<BlobHandler<ClientInputChunk> > > m_clientInputChunks; //< Internal data containing the inputs
74  KyArray<ClientInputDescriptor> m_clientInputParts; //< Internal usage for buffering
75  GeneratorSystem* m_sys; //< Internal usage from within the generation
76 };
77 
78 
79 
80 }
81 
82 
83 #endif
84 
Base interface for a class that opens a file on disk.
Definition: fileopener.h:35
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
GeneratorSystem gathers everything that is global across a generation: configuration, options...
Definition: generatorsystem.h:46
The ClientInput is a representation of the input that was supplied to the generator for a particular ...
Definition: clientinput.h:30
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
KyResult LoadParts(const char *fullFileName, FileOpenerBase *fileOpener)
Called by Load() once the m_clientInputParts strings have been retrieved from root client Input...
This class represents a three-dimensional axis-aligned bounding box whose dimensions are stored using...
Definition: box3f.h:25
static const KyGuid & GetInvalidGuid()
Returns the invalid KyGuid value.
Definition: gamekitcrowddispersion.h:20
The KyGuid class represents a globally unique ID.
Definition: kyguid.h:22
Easy to write/read version of ClientInputSectorDescriptorBlob.
Definition: clientinputsectordescriptor.h:38
The GeneratorParameters class contains configuration parameters that control the characteristics of t...
Definition: generatorparameters.h:75
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
KyGuid m_sectorGuid
The Kaim::KyGuid of the Kaim::GeneratorSector associated with this Kaim::ClientInput.
Definition: clientinput.h:87
GeneratorParameters m_globalConfig
The global config used for this Kaim::ClientInput.
Definition: clientinput.h:82
KyUInt32 m_databaseIndex
Index of the Lab's database in which the NavData will be added to.
Definition: clientinputsectordescriptor.h:71
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36