gwnavgeneration/generator/generatorsectorconfigblob.h Source File

generatorsectorconfigblob.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 
18 
19 namespace Kaim
20 {
21 
22 class GeneratorSector;
23 
26 {
27  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
28  KY_ROOT_BLOB_CLASS(Generator, GeneratorSectorBlob, 0)
30 public:
32 
33  BlobFieldArray m_fields;
34  CellBox m_navDataCellBox;
35  BlobArray<BlobArray<char> > m_inputFilenames;
36  BlobArray<Vec3f> m_inputSeedPoints;
37  BlobArray<ClientInputTagVolumeBlob> m_inputTagVolumes;
38  BlobArray<CellPos> m_previousPatchCellPosList;
39  CellBox m_previousInputCellBox;
40  BlobArray<Vec3f> m_previousSeedPoints;
41 };
42 
43 inline void SwapEndianness(Endianness::Target e, GeneratorSectorBlob& self)
44 {
45  SwapEndianness(e, self.m_fields);
46  SwapEndianness(e, self.m_navDataCellBox);
47  SwapEndianness(e, self.m_inputFilenames);
48  SwapEndianness(e, self.m_inputSeedPoints);
49  SwapEndianness(e, self.m_inputTagVolumes);
50  SwapEndianness(e, self.m_previousPatchCellPosList);
51  SwapEndianness(e, self.m_previousInputCellBox);
52  SwapEndianness(e, self.m_previousSeedPoints);
53 }
54 
56 class GeneratorSectorBlobBuilder : public BaseBlobBuilder<GeneratorSectorBlob>
57 {
58 public:
59  GeneratorSectorBlobBuilder(Ptr<GeneratorSector> sector) : m_sector(sector) {}
60 private:
61  virtual void DoBuild();
62 private:
63  Ptr<GeneratorSector> m_sector;
64 };
65 
66 }
67 
68 
69 
2d axis aligned box of 32bits integers. Very Important: CountX() returns m_max.x - m_min...
Definition: box2i.h:17
Used to serialize GeneratorInputOutput.
Definition: generatorsectorconfigblob.h:56
The Generator is the principal class in the NavData generation system.
Definition: generator.h:56
Used to serialize GeneratorInputOutput. Corresponds to GeneratorSector.
Definition: generatorsectorconfigblob.h:25
#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
virtual void DoBuild()
Implement this function in any class that derives from BaseBlobBuilder.
Definition: generatorsectorblobbuilder.cpp:16
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
A BlobArray an array that is compatible with the blob serialization framework.
Definition: blobarray.h:23
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
BaseBlobBuilder is an abstract base class that builds a blob within a contiguous block of memory...
Definition: baseblobbuilder.h:27