Atoms Crowd  7.0.0
UsdCacheReaderModule.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 #ifndef ATOMS_UNREAL
10 #include <Atoms/BehaviourModule.h>
11 #include <unordered_map>
12 #include <pxr/usd/usd/prim.h>
13 
14 namespace AtomsModules
15 {
17  {
18  public:
19 
21 
22  virtual ~UsdCacheReaderModule();
23 
24  void initSimulation(Atoms::AgentGroup* agentGroup = nullptr);
25 
26 
27  void agentsCreated(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
28 
29  void initFrame(const std::vector<Atoms::Agent*>& agents, Atoms::AgentGroup* agentGroup = nullptr);
30 
31  static Atoms::BehaviourModule* creator(const std::string& parameter);
32 
33  private:
34 
35  PXR_NS::UsdPrim m_rootPrim;
36 
37  double m_prevInFrame;
38 
39  double m_prevOutFrame;
40 
41  double m_prevTimeOffset;
42 
43  std::unordered_map<int, double> m_prevInAgentFrame;
44 
45  std::unordered_map<int, double> m_prevOutAgentFrame;
46 
47  std::unordered_map<int, double> m_prevAgentFrameOffset;
48 
49  std::unordered_map<int, bool> m_filterAgents;
50 
51  std::unordered_map<size_t, size_t> m_extraAgents;
52 
53  std::vector<unsigned int> m_killIds;
54 
55  int m_frameGenerated;
56 
57  std::string m_cachePath;
58 
59  int m_startFrame;
60 
61  int m_endFrame;
62  };
63 }
64 #endif
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: UsdCacheReaderModule.h:17
void agentsCreated(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Agents Created.
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Init frame.
void initSimulation(Atoms::AgentGroup *agentGroup=nullptr)
Init simulation.