simulator.h 755 Bytes
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef SIMULATOR_H
#define SIMULATOR_H

#include <limits>

#include "env_map.h"
#include "agent.h"
#include "path_finder.h"

#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>

class Simulator
{
public:
	Simulator();
	
	Simulator(
		float timeStep, float neighborDist, unsigned int maxNeighbors,
		float timeHorizon, float timeHorizonObst, float radius,
		float maxSpeed, const VEC3& velocity = VEC3(0)
	);
	
	~Simulator();
	
	void doStep();
	
30
	void setupScenario(unsigned int nbMaxAgent);
31
	void addPathsToAgents();
Pierre Kraemer's avatar
Pierre Kraemer committed
32
33
34
35
36
37
38
39
40
41
42
43
44
45
	
	bool importAgents(std::string filename);
	bool exportAgents(std::string filename);
	
	void swapAgentsGoals();
	
	EnvMap envMap_;
	std::vector<Agent*> agents_;
	
	float globalTime_;
	float timeStep_;
};

#endif