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

📄 application.h

📁 坦克大战
💻 H
字号:
#ifndef APPLICATION_H
#define APPLICATION_H

#include <Ogre.h>
#include <OIS/OIS.h>
#include <CEGUI/CEGUI.h>
#include <OgreCEGUIRenderer.h>

#include "NxOgre.h"
#include "InputHandler.h"
    
using namespace Ogre;
using namespace NxOgre;

class Application
{
friend class InputHandler;

public:
    void go();

	Application();

    ~Application();

private:
    Root *mRoot;

    OIS::Keyboard *mKeyboard;
	OIS::Mouse *mMouse;
    OIS::InputManager *mInputManager;
    CEGUI::OgreCEGUIRenderer *mRenderer;
    CEGUI::System *mSystem;
    InputHandler *mInputHandler;
	RenderWindow *mWindow;

	Camera *mCamera;
	SceneManager *mSceneMgr;
	World* mWorld;
	Scene* mScene;

	enum ViewType
	{
		FREE,
		WOW,
		INTERNAL,
		FRONT,
		BACK,
		FLY_BY
	};
	ViewType mViewType;

    void createRoot();
    
    void defineResources();
    
    void setupRenderSystem();
    
    void createRenderWindow();

    void initializeResourceGroups();

    void createScene();

	void setupInputSystem();

    void setupCEGUI();

    void createFrameListener();

    void startRenderLoop();
};


#endif

⌨️ 快捷键说明

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