gwnavruntime/world/botneedfullcomputeflags.h Source File

botneedfullcomputeflags.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 // primary contact: GUAL - secondary contact: NONE
8 #ifndef Navigation_BotNeedFullComputeFlags_H
9 #define Navigation_BotNeedFullComputeFlags_H
10 
12 
13 
14 namespace Kaim
15 {
16 
17 
18 class BotNeedFullComputeFlags
19 {
21 
22 public:
23  // ---------------------------------- Public Member Functions ----------------------------------
24 
25  BotNeedFullComputeFlags() { SetDefaults(); }
26 
28  void SetDefaults()
29  {
30  m_pathEventListNeedFullCompute = true;
31  m_colliderCollectionNeedFullCompute = true;
32  m_trajectoryNeedFullCompute = true;
33  m_trajectoryFailedToFollowPath = false;
34  m_pathEventListChangedLastUpdate = false;
35  m_spatializationNeedUpdate = true;
36  }
37 
38  bool GetPathEventListNeedFullCompute() const { return m_pathEventListNeedFullCompute; }
39  bool GetColliderCollectionNeedFullCompute() const { return m_colliderCollectionNeedFullCompute; }
40  bool GetTrajectoryNeedFullCompute() const { return m_trajectoryNeedFullCompute; }
41  bool GetTrajectoryFailedToFollowPath() const { return m_trajectoryFailedToFollowPath; }
42  bool GetPathEventListChangedLastUpdate() const { return m_pathEventListChangedLastUpdate; }
43  bool GetSpatializationNeedUpdate() const { return m_spatializationNeedUpdate; }
44 
45  void PathHasChanged()
46  {
47  m_trajectoryFailedToFollowPath = false;
48  m_pathEventListNeedFullCompute = true;
49  m_trajectoryNeedFullCompute = true;
50  }
51 
52  void PathEventListStartedFullCompute()
53  {
54  m_pathEventListNeedFullCompute = false; // ok PathEventList compute started
55  }
56 
57  void PathEventListHasChanged()
58  {
59  m_pathEventListChangedLastUpdate = true;
60  }
61 
62  void PathEventListUnchanged()
63  {
64  m_pathEventListChangedLastUpdate = false;
65  }
66 
67  void TrajectoryHasBeenFullyRecomputed()
68  {
69  m_trajectoryNeedFullCompute = false;
70  }
71 
72  void TrajectoryFailedToFollowPath()
73  {
74  m_trajectoryFailedToFollowPath = true;
75  }
76 
77  void ColliderCollectionHasBeenFullyRecomputed()
78  {
79  m_colliderCollectionNeedFullCompute = false;
80  }
81 
82  void EnableAvoidanceHasChanged()
83  {
84  // do nothing, avoidance is computed every frame
85  }
86 
87  void PathEventListConfigHasChanged()
88  {
89  m_pathEventListNeedFullCompute = true;
90  m_trajectoryNeedFullCompute = true;
91  }
92 
93  void ShortcutTrajectoryConfigHasChanged()
94  {
95  m_trajectoryNeedFullCompute = true;
96  }
97 
98  void SplineTrajectoryConfigHasChanged()
99  {
100  m_trajectoryNeedFullCompute = true;
101  }
102 
103  void TrajectoryModeHasChanged()
104  {
105  m_trajectoryNeedFullCompute = true;
106  }
107 
108  void ColliderCollectorConfigHasChanged()
109  {
110  m_colliderCollectionNeedFullCompute = true;
111  m_trajectoryNeedFullCompute = true;
112  }
113 
114  void AvoidanceConfigHasChanged()
115  {
116  // do nothing, avoidance is computed every frame
117  }
118 
119  void DoComputeTrajectoryHasBecomeTrue()
120  {
121  m_trajectoryNeedFullCompute = true;
122  }
123 
124  void PositionHasChanged()
125  {
126  m_spatializationNeedUpdate = true;
127  }
128 
129  void SpatializationUpdated()
130  {
131  m_spatializationNeedUpdate = false;
132  }
133 
134 public:
135  // ---------------------------------- Public Data Members ----------------------------------
136  bool m_pathEventListNeedFullCompute;
137  bool m_colliderCollectionNeedFullCompute;
138  bool m_trajectoryNeedFullCompute;
139  bool m_trajectoryFailedToFollowPath;
140  bool m_pathEventListChangedLastUpdate;
141  bool m_spatializationNeedUpdate;
142 };
143 
144 
145 } // namespace Kaim
146 
147 #endif // Navigation_BotNeedFullComputeFlags_H
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137