Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogreode/demos/Landscape/include/Landscape.h @ 30

Last change on this file since 30 was 21, checked in by nicolasc, 17 years ago

added ogreode and Colladaplugin

File size: 1.3 KB
Line 
1#include "ExampleApplication.h"
2#include "OgreOde_Core.h"
3#include "OgreOde_Prefab.h"
4#include "OgreOde_Loader.h"
5
6class LandscapeFrameListener : public ExampleFrameListener, 
7    public OgreOde::TerrainGeometryHeightListener, 
8    public OgreOde::CollisionListener
9{
10public:
11        LandscapeFrameListener(Ogre::RenderWindow* win, Ogre::Camera* cam, Ogre::Root* root);
12        ~LandscapeFrameListener();
13    bool frameStarted(const Ogre::FrameEvent& evt);
14        void changeCar();
15
16private:
17        void updateInfo();
18        OgreOde::StepHandler *_stepper;
19        OgreOde_Prefab::Vehicle *_vehicle;
20        Ogre::RaySceneQuery *_ray_query;
21    Ogre::Ray ray;
22        char _drive;
23    OgreOde_Loader::DotLoader *dotOgreOdeLoader;
24
25    virtual Ogre::Real heightAt(const Ogre::Vector3& position);
26    virtual bool collision(OgreOde::Contact* contact);
27
28protected:
29    Ogre::SceneManager *mSceneMgr;
30    OgreOde::World *_world;
31    OgreOde::TerrainGeometry *_terrain;
32    Ogre::Real _time_step;
33    size_t _average_num_query;
34};
35
36
37
38class LandscapeApplication : public ExampleApplication
39{
40public:
41    LandscapeApplication();
42    ~LandscapeApplication();
43
44protected:
45        virtual bool setup(void);
46    virtual void chooseSceneManager(void);
47        virtual void setupResources(void);
48    virtual void createCamera(void);
49    void createScene(void);
50        void createFrameListener(void);
51
52
53};
54
Note: See TracBrowser for help on using the repository browser.