Atoms Crowd  7.0.0
RVO3D.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/Agent.h>
11 #include <AtomsCore/AtomsMath.h>
12 
13 
14 namespace Atoms
15 {
16  namespace RVO3D
17  {
18  class Plane {
19  public:
20  AtomsMath::Vector3f point;
21 
22  AtomsMath::Vector3f normal;
23  };
24 
25  class Line {
26  public:
27 
28  AtomsMath::Vector3f direction;
29 
30  AtomsMath::Vector3f point;
31  };
32 
33  ATOMS_EXPORT size_t computeORCAPlanes(
34  const AtomsCore::Vector3f& position,
35  const AtomsCore::Vector3f& velocity,
36  const AtomsCore::Vector3f& prefVelocity,
37  const std::vector<const Atoms::Agent*>& agentNeighbors,
38  float timeHorizon,
39  float radius,
40  float maxSpeed,
41  float timeStep,
42  float fps,
43  float sceneScale,
44  float radiusMultiplier,
45  int step,
46  int steps,
47  std::vector<Atoms::RVO3D::Plane>& orcaPlanes);
48 
49  ATOMS_EXPORT AtomsCore::Vector3f computeNewVelocity(
50  const AtomsCore::Vector3f& position,
51  const AtomsCore::Vector3f& velocity,
52  AtomsCore::Vector3f prefVelocity,
53  const std::vector<const Atoms::Agent*>& neighbors,
54  float timeHorizon,
55  float radius,
56  float maxSpeed,
57  float timeStep,
58  float fps,
59  float sceneScale,
60  float radiusMultiplier,
61  float obstacleRadiusMultiplier,
62  int step,
63  int steps);
64 
65  ATOMS_EXPORT bool linearProgram1(
66  const std::vector<Plane> &planes,
67  size_t planeNo,
68  const Line &line,
69  float radius,
70  const AtomsMath::Vector3f &optVelocity,
71  bool directionOpt,
72  AtomsMath::Vector3f &result);
73 
74  ATOMS_EXPORT bool linearProgram2(
75  const std::vector<Plane> &planes,
76  size_t planeNo,
77  float radius,
78  const AtomsMath::Vector3f &optVelocity,
79  bool directionOpt,
80  AtomsMath::Vector3f &result);
81 
82  ATOMS_EXPORT size_t linearProgram3(
83  const std::vector<Plane> &planes,
84  float radius,
85  const AtomsMath::Vector3f &optVelocity,
86  bool directionOpt,
87  AtomsMath::Vector3f &result);
88 
89  ATOMS_EXPORT void linearProgram4(
90  const std::vector<Plane> &planes,
91  size_t beginPlane,
92  float radius,
93  AtomsMath::Vector3f &result);
94  }
95 }
Definition: RVO3D.h:25
Definition: RVO3D.h:18
AtomsMath::Vector3f Vector3f
Vector3 class.
Definition: AtomsMath.h:58
Atoms namespace.
Definition: Agent.h:29