Atoms Crowd  7.0.0
CurveLayoutGenerator.h
1 #pragma once
2 #include <Atoms/LayoutGenerators/DynamicLayoutGenerator.h>
3 #include <AtomsUtils/Curve.h>
4 
5 namespace Atoms
6 {
7  class ATOMS_EXPORT CurveLayoutGenerator : public DynamicLayoutGenerator
8  {
9  public:
10 
12 
13  virtual ~CurveLayoutGenerator();
14 
15  // the generator function
16  virtual std::vector<AgentInitData> generate(double time)
17  #ifdef __APPLE__
18  override
19  #endif
20  ;
21 
22  inline void setCurve(AtomsUtils::Curve& curve) { m_curve = curve; }
23 
24  inline void setNumberOfAgents(size_t value) { m_numberOfAgents = value; }
25 
26  inline void setDepth(size_t value) { m_depth = value; }
27 
28  inline void setDepthSpace(double value) { m_depthSpace = value; }
29 
30  inline void setUseCVs(bool value) { m_useCVs = value; }
31 
32  inline void setDirectionType(short value) { m_directionType = value; }
33 
34  inline void setInvertDirection(bool value) { m_invertDirection = value; }
35 
36  inline void setRandomSpace(AtomsCore::Vector3& dir) { m_randomSpace = dir; }
37 
38  inline void setSeed(size_t value) { m_seed = value; }
39 
40  inline const char* typeName() override { return "curveLayout"; };
41 
42  private:
43 
44  // Input curve
45  AtomsUtils::Curve m_curve;
46 
47  // Random space
48  AtomsCore::Vector3 m_randomSpace;
49 
50  // Number of agents along the curve
51  size_t m_numberOfAgents;
52 
53  // Number of depth rows
54  size_t m_depth;
55 
56  // Seed
57  size_t m_seed;
58 
59  // Depth row space
60  double m_depthSpace;
61 
62  // Direction type: 0 - tangent, 1 - normal, 2 - custom
63  short m_directionType;
64 
65  // Invert the direction
66  bool m_invertDirection;
67 
68  // Use cvs instead num agents
69  bool m_useCVs;
70 
71  };
72 }
Definition: CurveLayoutGenerator.h:8
const char * typeName() override
Get the type name for this generator.
Definition: CurveLayoutGenerator.h:40
virtual std::vector< AgentInitData > generate(double time)
Generate a vector of agent init data.
Definition: DynamicLayoutGenerator.h:15
Nurbs curve.
Definition: Curve.h:18
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
Atoms namespace.
Definition: Agent.h:29