10 #include <Atoms/BehaviourModule.h>
11 #include <Atoms/Avoidance/RVO2.h>
12 #include <AtomsUtils/KdTreePoint.h>
13 #include <AtomsUtils/NavigationMesh/NavMesh.h>
17 namespace AtomsModules
36 std::vector<AtomsCore::Vector3> obstacleNeighborsPos;
37 std::vector<AtomsCore::Vector3> neighborsPos;
39 std::vector<int> neighborsIds;
60 void registerTreeLoaderCallback(std::function<AtomsPtr<Atoms::RVO2::KdTreeObstacle>()>& callback)
62 m_obstacleTreeloaderCallback = callback;
68 static size_t addObstacle(
const std::vector<AtomsMath::Vector3f>& vertices, std::vector<Atoms::RVO2::Obstacle*>& obstacles);
70 static size_t addObstacleEdge(
const AtomsMath::Vector3f& a,
const AtomsMath::Vector3f& b, std::vector<Atoms::RVO2::Obstacle*>& obstacles);
72 std::vector<DebugData> m_debugData;
76 std::vector<Atoms::RVO2::Obstacle*> m_obstacles;
78 AtomsPtr<Atoms::RVO2::KdTreeObstacle> m_obstaclesTree;
80 std::vector<Atoms::RVO2::Obstacle*> m_obstacles;
82 std::function<AtomsPtr<Atoms::RVO2::KdTreeObstacle>()> m_obstacleTreeloaderCallback;
86 std::vector<Atoms::RVO2::Obstacle*> m_dynObstacles;
88 std::vector<std::vector<AtomsMath::Vector2f>> m_dynObstaclesConvexPoly;
Agent group.
Definition: AgentGroup.h:36
Behaviour module.
Definition: BehaviourModule.h:32
Definition: DrawContext.h:17
Definition: AgentAvoidanceModule.h:20
void initSimulation(Atoms::AgentGroup *agentGroup=nullptr)
Init simulation.
void endFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
End frame.
void draw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Draw.
void preDraw(Atoms::DrawContext *context, const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Pre draw.
void initFrame(const std::vector< Atoms::Agent * > &agents, Atoms::AgentGroup *agentGroup=nullptr)
Init frame.
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
Definition: AgentAvoidanceModule.h:24
Definition: AgentAvoidanceModule.h:35