landscape.h
来自「赫赫大名的 OGRE 游戏引擎」· C头文件 代码 · 共 54 行
H
54 行
#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 + =
减小字号Ctrl + -
显示快捷键?