⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 landscape.h

📁 使用stl技术,(还没看,是听说的)
💻 H
字号:
#include "ExampleApplication.h"
#include "OgreOde.h"

class LandscapeFrameListener : public ExampleFrameListener
{
public:
	LandscapeFrameListener(RenderWindow* win, Camera* cam,Real time_step,OgreOde::Vehicle* vehicle,Root* root);
	~LandscapeFrameListener();
    bool frameStarted(const FrameEvent& evt);

private:
	OgreOde::Stepper *_stepper;
	OgreOde::Vehicle *_vehicle;
	RaySceneQuery *_ray_query;
};



class LandscapeApplication : public ExampleApplication
#ifdef OGREODE_TERRAINGEOMETRY
	,public OgreOde::TerrainGeometryHeightListener
#endif
	,public OgreOde::CollisionListener
{
public:
    LandscapeApplication();
    ~LandscapeApplication();

protected:

    virtual void chooseSceneManager(void);
	virtual void setupResources(void);
    virtual void createCamera(void);
    void createScene(void);
	void createFrameListener(void);

#ifdef OGREODE_TERRAINGEOMETRY
	virtual Real heightAt(const Vector3& position);
#endif

	virtual bool collision(OgreOde::Contact* contact);

	protected:
		OgreOde::World *_world;
		OgreOde::Vehicle *_vehicle;
#ifdef OGREODE_TERRAINGEOMETRY
		OgreOde::TerrainGeometry *_terrain;
#else
		OgreOde::InfinitePlaneGeometry *_terrain;
#endif
		Real _time_step;
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -