Atoms Crowd  7.0.0
ContextSteering.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/Globals.h>
11 #include <vector>
12 
13 namespace Atoms
14 {
15  class ATOMS_EXPORT ContextSteeringData
16  {
17  public:
18 
19  enum class Flags : unsigned short
20  {
21  Empty = 0,
22  DisableAgentAvoidance = (1 << 0),
23  DisableNavigation = (1 << 1),
24  DisableGroundAdaptation = (1 << 2),
25  UseAgentDirection = (1 << 3)
26  };
27 
29 
31 
32  void clear();
33 
34  void setNumSamples(unsigned int numSamples);
35 
36  void disableAgentAvoidance(bool value);
37 
38  bool hasAgentAvoidanceDisabled() const;
39 
40  void disableNavigation(bool value);
41 
42  bool hasNavigationDisabled() const;
43 
44  void disableGroundAdaptation(bool value);
45 
46  bool hasGroundAdaptationDisabled() const;
47 
48  bool useAgentDirection() const;
49 
50  void setUseAgentDirection(bool value);
51 
52  void fillInterestMap(const AtomsMath::Vector3& direction, float weight);
53 
54  double getSlot(const AtomsMath::Vector3& dir);
55 
56  public:
57 
58  AtomsMath::Vector3 position;
59  AtomsMath::Vector3 direction;
60  AtomsMath::Vector3 up;
61  AtomsMath::Vector3 lastDirection;
62  AtomsMath::Vector3 target;
63  std::vector<AtomsMath::Vector3> obstacles;
64  std::vector<float> samples;
65  std::vector<float> danger;
66  std::vector<float> interest;
67  std::vector<float> result;
68  float distance;
69  float previousLinearVelocity;
70  float maxLinearAcceration;
71  float lastWeight;
72  unsigned int dynamicSamples;
73  unsigned int numDirectionalModules;
74  Flags flags;
75  int reactionTime;
76  int currentTime;
77  int randomSeed;
78  bool useTarget;
79  };
80 }
Definition: ContextSteering.h:16
Atoms namespace.
Definition: Agent.h:29