Atoms Crowd  7.0.0
CurveFieldModule.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/BehaviourModule.h>
11 #include <AtomsUtils/Mesh.h>
12 
13 namespace AtomsModules
14 {
16  {
17  public:
18 
20 
21  virtual ~CurveFieldModule();
22 
23  void initSimulation(Atoms::AgentGroup* agentGroup);
24 
25  void initFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup);
26 
27  void endFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
28 
29  void draw(Atoms::DrawContext* context, const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup);
30 
31  static Atoms::BehaviourModule* creator(const std::string& parameter);
32 
33  private:
34 
35  std::vector<std::vector<AtomsCore::Vector3f>> points;
36 
37  std::vector<std::vector<AtomsCore::Vector3f>> tangents;
38 
39  std::vector<AtomsCore::Vector3> m_pointsDebug;
40 
41  std::vector<AtomsCore::Vector3> m_tangentsDebug;
42 
43  std::vector<AtomsCore::Vector3> m_agentTangentsDebug;
44 
45  std::vector<AtomsCore::Vector3> m_agentClosedTangentsDebug;
46 
47  std::vector < std::vector<AtomsCore::Vector3>> m_influenceDebug;
48 
49  std::vector<std::vector<AtomsCore::Vector3>> m_influenceDropOffDebug;
50 
51  bool m_activeDraw;
52  };
53 }
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: DrawContext.h:17
Definition: CurveFieldModule.h:16
void draw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup)
Draw.
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup)
Init frame.
void initSimulation(Atoms::AgentGroup *agentGroup)
Init simulation.
void endFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
End frame.