simulator.h 572 Bytes
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3
#ifndef SIMULATOR_H
#define SIMULATOR_H

Thomas Pitiot 's avatar
Thomas Pitiot committed
4
#include "agent.h"
Thomas Pitiot 's avatar
Thomas Pitiot committed
5
#include "env_map.h"
6 7 8
#include <iostream>
#include <string>
#include <fstream>
9

pitiot's avatar
pitiot committed
10
using namespace CGoGN ;
Pierre Kraemer's avatar
Pierre Kraemer committed
11 12 13
class Simulator
{
public:
pitiot's avatar
pitiot committed
14
	Simulator() ;
15 16 17

	~Simulator() ;

pitiot's avatar
pitiot committed
18 19
	void init(int argc, char **argv);
	void doStep();
Thomas Pitiot 's avatar
Thomas Pitiot committed
20
    void initAgents(int nbAgents);
21 22 23 24 25
    std::vector<VEC3>  getPositions(int nbAgents, VEC3 center, float radius);



    // MAP
pitiot's avatar
pitiot committed
26
    EnvMap envMap_;
27 28

    //simulation values
pitiot's avatar
pitiot committed
29
	double nbSteps_;
Thomas Pitiot 's avatar
Thomas Pitiot committed
30
    float timeStep_;
31 32 33 34 35




    //objects presents
Thomas Pitiot 's avatar
Thomas Pitiot committed
36
    std::vector<Agent *>agents;
37
    int nb_dead;
38

pitiot's avatar
pitiot committed
39
};
Pierre Kraemer's avatar
Pierre Kraemer committed
40 41

#endif