Atoms Crowd  7.0.0
TorusLayoutGenerator.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 TorusLayoutGenerator: public DynamicLayoutGenerator
15  {
16  public:
17 
19 
20  virtual ~TorusLayoutGenerator();
21 
22  virtual std::vector<AgentInitData> generate(double time)
23  #ifdef __APPLE__
24  override
25  #endif
26  ;
27 
28  inline double torusRadius();
29 
30  inline double torusSectionRadius();
31 
32  inline void setTorusRadius(const double radius);
33 
34  inline void setTorusSectionRadius(const double sectionRadius);
35 
36  inline double defaultRadius() const;
37 
38  inline void setDefaultRadius(double radius);
39 
40  inline double maxRadius() const;
41 
42  inline void setMaxRadius(double radius);
43 
44  inline bool randomizeRadius() const;
45 
46  inline void setRandomizeRadius(bool randomize);
47 
48  inline int iterations() const;
49 
50  inline void setIterations(int iterations);
51 
52  inline const AtomsCore::Vector3& randomDirection() const;
53 
54  inline void setRandomDirection(const AtomsCore::Vector3& dir);
55 
56  inline const AtomsCore::Vector3& randomUpVector() const;
57 
58  inline void setRandomUpVector(const AtomsCore::Vector3& up);
59 
60  inline const AtomsCore::Matrix& matrix() const;
61 
62  inline void setMatrix(const AtomsCore::Matrix& mtx);
63 
64  inline unsigned int seed() const;
65 
66  inline void setSeed(unsigned int value);
67 
68  inline void setCenterOffset(const AtomsCore::Vector3 offset);
69 
70  inline const char* typeName() override { return "torusLayout"; };
71 
72  private:
73 
74  AtomsCore::Matrix m_matrix;
75 
76  AtomsCore::Vector3 m_randomDirection;
77 
78  AtomsCore::Vector3 m_randomUpVector;
79 
80  AtomsCore::Vector3 m_centerOffset;
81 
82  double m_torusRadius;
83 
84  double m_torusSectionRadius;
85 
86  double m_defaultRadius;
87 
88  double m_maxRadius;
89 
90  int m_iterations;
91 
92  unsigned int m_seed;
93 
94  AtomsCore::Rand48 m_random;
95 
96  AtomsCore::Rand48 m_randomRadius;
97 
98  bool m_randomizeRadius;
99  };
100 }
101 
102 #include "TorusLayoutGenerator.impl.h"
Definition: DynamicLayoutGenerator.h:15
Definition: TorusLayoutGenerator.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: TorusLayoutGenerator.h:70
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
AtomsMath::Matrix Matrix
Matrix class.
Definition: AtomsMath.h:63
Atoms namespace.
Definition: Agent.h:29