source: proiecte/SIMEO/Simeo/src/SimeoEngine/Master.h @ 167

Last change on this file since 167 was 167, checked in by (none), 14 years ago

Simeo: added final project and also older proof of concept code.

We used Git for version control, so look at the Git repo
in SIMEO/Simeo/ for more info.

File size: 1.0 KB
Line 
1#ifndef MASTER_H
2#define MASTER_H
3
4#include <vector>
5#include <map>
6#include <utility>
7#include <list>
8
9#include <mpi.h>
10
11#include "btBulletDynamicsCommon.h"
12#include "MPIChannel.h"
13
14#include "SensorProvider.h"
15#include "ActuatorProvider.h"
16#include "CommChannelProvider.h"
17
18#include "Sensor.h"
19#include "Actuator.h"
20#include "SimpleAgent.h"
21#include "CommChannel.h"
22
23#include "Environment.h"
24#include "constants.h"
25
26#include "Gui.h"
27
28using namespace std;
29
30
31typedef struct {
32    btScalar m[16];
33    btMatrix3x3 rot;
34    btVector3  aabbMin,aabbMax;
35    btCollisionShape *shape;
36} WorldObject;
37
38class Master {
39private:
40        WorldObject data;
41        pair<int, int> x;
42
43        vector<XProvider *> xList;
44
45        map<int, pair<int, int> > positionID;
46
47        int m_nprocs;
48        Environment *m_bullet;
49        Gui *m_gui;
50        bool m_running;
51
52public:
53        Master(Environment *bullet, int nprocs);
54        ~Master();
55
56        int sendAll();
57        void run();
58        void stop();
59
60        int getID(int i, int j);
61        void discoverAgents();
62        void createProviders();
63        void sendHello(int id);
64
65};
66
67
68#endif //MASTER_H
Note: See TracBrowser for help on using the repository browser.