gwnavgeneration/input/inputcellblobbuilder.h Source File

inputcellblobbuilder.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 
14 
15 
16 namespace Kaim
17 {
18 
19 class GeneratorSystem;
20 class DynamicInputCell;
21 
22 
23 class InputCellBlobBuilder : public BaseBlobBuilder<InputCellBlob>
24 {
25 public:
26  InputCellBlobBuilder(GeneratorSystem* sys, const DynamicInputCell& dynInputCell) { m_sys = sys; m_dynInputCell = &dynInputCell; }
27 
28 private:
29  virtual void DoBuild();
30  GeneratorSystem* m_sys;
31  const DynamicInputCell* m_dynInputCell;
32 };
33 
34 
35 class InputCellBlobMerger : public BaseBlobBuilder<InputCellBlob>
36 {
37 public:
38  InputCellBlobMerger(const KyArrayPOD<const InputCellBlob*>& inputCellBlobs) { m_inputCellBlobs = &inputCellBlobs; }
39 
40 private:
41  virtual void DoBuild();
42 
43  const KyArrayPOD<const InputCellBlob*>* m_inputCellBlobs;
44 };
45 
46 
47 class InputCellBlobCopier : public BaseBlobBuilder<InputCellBlob>
48 {
49 public:
50  InputCellBlobCopier(const InputCellBlob* otherInputCellBlob) { m_inputCellBlob = otherInputCellBlob; }
51 
52 private:
53  virtual void DoBuild()
54  {
55  KyArrayPOD<const InputCellBlob*> dummyArray;
56  dummyArray.PushBack(m_inputCellBlob);
57  BLOB_BUILD(*m_blob, InputCellBlobMerger(dummyArray));
58  }
59  const InputCellBlob* m_inputCellBlob;
60 };
61 
62 }
63 
64 
#define BLOB_BUILD(blob, builder)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:175
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17