Atoms Crowd  7.0.0
GridLayoutGenerator.h
1 #pragma once
2 // ===========================================================================
3 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Toolchefs license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 
10 #include <Atoms/LayoutGenerators/DynamicLayoutGenerator.h>
11 
12 namespace Atoms
13 {
14  class ATOMS_EXPORT GridLayoutGenerator: public DynamicLayoutGenerator
15  {
16  public:
17 
19 
20  virtual ~GridLayoutGenerator();
21 
22  virtual std::vector<AgentInitData> generate(double time)
23  #ifdef __APPLE__
24  override
25  #endif
26  ;
27 
28  inline unsigned int sizeX();
29 
30  inline void setSizeX(unsigned int sx);
31 
32  inline unsigned int sizeY();
33 
34  inline void setSizeY(unsigned int sy);
35 
36  inline unsigned int sizeZ();
37 
38  inline void setSizeZ(unsigned int sz);
39 
40  inline AtomsCore::Vector3 space();
41 
42  inline void setSpace(const AtomsCore::Vector3& space);
43 
44  inline AtomsCore::Vector3 randomSpace();
45 
46  inline void setRandomSpace(const AtomsCore::Vector3& space);
47 
48  inline AtomsCore::Vector3 randomDirection();
49 
50  inline void setRandomDirection(const AtomsCore::Vector3& dir);
51 
52  inline AtomsCore::Matrix matrix();
53 
54  inline void setMatrix(const AtomsCore::Matrix& mtx);
55 
56  inline unsigned int seed();
57 
58  inline void setSeed(unsigned int value);
59 
60  inline void setCenterOffset(const AtomsCore::Vector3 offset);
61 
62  inline const char* typeName() override { return "gridLayout"; };
63 
64  private:
65 
66  AtomsCore::Matrix m_matrix;
67 
68  AtomsCore::Vector3 m_space;
69 
70  AtomsCore::Vector3 m_randomSpace;
71 
72  AtomsCore::Vector3 m_randomDirection;
73 
74  AtomsCore::Vector3 m_centerOffset;
75 
76  unsigned int m_sizeX;
77 
78  unsigned int m_sizeY;
79 
80  unsigned int m_sizeZ;
81 
82  unsigned int m_seed;
83 
84  };
85 }
86 
87 #include "GridLayoutGenerator.impl.h"
Definition: DynamicLayoutGenerator.h:15
Definition: GridLayoutGenerator.h:15
virtual std::vector< AgentInitData > generate(double time)
Generate a vector of agent init data.
const char * typeName() override
Get the type name for this generator.
Definition: GridLayoutGenerator.h:62
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
AtomsMath::Matrix Matrix
Matrix class.
Definition: AtomsMath.h:63
Atoms namespace.
Definition: Agent.h:29