Last change
on this file since 27 was
21,
checked in by nicolasc, 17 years ago
|
added ogreode and Colladaplugin
|
File size:
1.1 KB
|
Line | |
---|
1 | #include "ExampleApplication.h" |
---|
2 | #include "OgreOde_Core.h" |
---|
3 | #include "OgreOde_Prefab.h" |
---|
4 | #include "OgreOde_Loader.h" |
---|
5 | |
---|
6 | class GranTurismOgreFrameListener : public ExampleFrameListener |
---|
7 | { |
---|
8 | public: |
---|
9 | GranTurismOgreFrameListener(RenderWindow* win, Camera* cam,Real time_step,Root* root,OgreOde::World *world); |
---|
10 | ~GranTurismOgreFrameListener(); |
---|
11 | bool frameStarted(const FrameEvent& evt); |
---|
12 | void changeCar(); |
---|
13 | |
---|
14 | private: |
---|
15 | void updateInfo(); |
---|
16 | OgreOde::StepHandler *_stepper; |
---|
17 | OgreOde::World *_world; |
---|
18 | OgreOde_Prefab::Vehicle *_vehicle; |
---|
19 | char _drive; |
---|
20 | OgreOde_Loader::DotLoader *dotOgreOdeLoader; |
---|
21 | }; |
---|
22 | |
---|
23 | |
---|
24 | |
---|
25 | class GranTurismOgreApplication : public ExampleApplication,public OgreOde::CollisionListener |
---|
26 | { |
---|
27 | public: |
---|
28 | GranTurismOgreApplication(); |
---|
29 | ~GranTurismOgreApplication(); |
---|
30 | |
---|
31 | protected: |
---|
32 | |
---|
33 | virtual void chooseSceneManager(void); |
---|
34 | virtual void setupResources(void); |
---|
35 | virtual void createCamera(void); |
---|
36 | void createScene(void); |
---|
37 | void createFrameListener(void); |
---|
38 | |
---|
39 | virtual bool collision(OgreOde::Contact* contact); |
---|
40 | |
---|
41 | protected: |
---|
42 | OgreOde::World *_world; |
---|
43 | OgreOde_Prefab::Vehicle *_vehicle; |
---|
44 | OgreOde::TriangleMeshGeometry *_track; |
---|
45 | |
---|
46 | Real _time_step; |
---|
47 | }; |
---|
48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.