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.2 KB
|
Line | |
---|
1 | #ifndef ENVIRONMENT_H |
---|
2 | #define ENVIRONMENT_H |
---|
3 | |
---|
4 | #include "constants.h" |
---|
5 | #include "Agent.h" |
---|
6 | #include <vector> |
---|
7 | |
---|
8 | #include "btBulletDynamicsCommon.h" |
---|
9 | |
---|
10 | #include "GlutStuff.h" |
---|
11 | #include "GLDebugDrawer.h" |
---|
12 | |
---|
13 | class Environment |
---|
14 | { |
---|
15 | |
---|
16 | private: |
---|
17 | btDynamicsWorld *m_dynamicsWorld; |
---|
18 | btCollisionShape* groundShape; |
---|
19 | btTransform groundTransform; |
---|
20 | btCollisionShape* colShape; |
---|
21 | |
---|
22 | btAlignedObjectArray<btCollisionShape*> m_collisionShapes; |
---|
23 | |
---|
24 | btBroadphaseInterface* m_broadphase; |
---|
25 | btCollisionDispatcher* m_dispatcher; |
---|
26 | btConstraintSolver* m_solver; |
---|
27 | btDefaultCollisionConfiguration* m_collisionConfiguration; |
---|
28 | |
---|
29 | btAlignedObjectArray<btTypedConstraint*> m_joints; |
---|
30 | btAlignedObjectArray<btAlignedObjectArray<int> > m_matrix; |
---|
31 | |
---|
32 | enum { |
---|
33 | LEFT=0, RIGHT=1, UP=2, DOWN=3 |
---|
34 | }; |
---|
35 | |
---|
36 | public: |
---|
37 | |
---|
38 | Environment(); |
---|
39 | |
---|
40 | ~Environment() { }; |
---|
41 | |
---|
42 | void addAgent(Agent *agent); |
---|
43 | |
---|
44 | void setupEnvironment(); |
---|
45 | |
---|
46 | |
---|
47 | void createMagicCarpet(int n, int m); |
---|
48 | btAlignedObjectArray<btCollisionShape*> getCollisionShapes(); |
---|
49 | btDynamicsWorld *getDynamicsWorld(); |
---|
50 | |
---|
51 | btAlignedObjectArray<btTypedConstraint*> getJoints() |
---|
52 | { |
---|
53 | return m_joints; |
---|
54 | } |
---|
55 | |
---|
56 | btAlignedObjectArray<btAlignedObjectArray<int> > getMatrix() |
---|
57 | { |
---|
58 | return m_matrix; |
---|
59 | } |
---|
60 | |
---|
61 | void exitEnvironment(); |
---|
62 | }; |
---|
63 | |
---|
64 | |
---|
65 | |
---|
66 | #endif //ENVIRONMENT_H |
---|
Note: See
TracBrowser
for help on using the repository browser.