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

📄 application.h

📁 赫赫大名的 OGRE 游戏引擎
💻 H
字号:
/** @file Application.h
	@brief Contains the definition of the Application class.
*/
#ifndef __Application_H__
#define __Application_H__

// Program includes
#include "Prerequisites.h"

/** Ogre Application class (also a FrameListener) for OgreTok demo.
*/
class Application : public FrameListener
{
protected:

	// OGRE objects
    Root* mRoot;							///< Ogre root
    Camera* mCamera;						///< Camera
    SceneManager* mSceneMgr;				///< Ogre scene manager
    RenderWindow* mWindow;					///< Rendering window
    InputReader* mInputDevice;				///< Input reader

	// Input
    Real mTimeUntilNextAction ;				///< Time until next user action

	// Camera movement
    Vector3 mTranslateVector;				///< Camera movement vector
    float mMoveScale;						///< Camera movement speed
    float mRotScale;						///< Camera rotations peed
    float mRotX, mRotY;						///< Camera rotation

	// Physics
	Simulation* mSimulation;				///< OgreTok Simulation
	DynamicSphere* mBullet;					///< The bullet object
	bool mPhysicsPaused;					///< Physics paused/running (matrix mode)
	Real mPhysicsSpeed;						///< Fraction of OGRE speed at which to run the Physics sim (for slowdown/speedup)

	// Misc
	int mSceneDetailIndex;					///< Current camera level of detail
	bool mStatsOn;							///< Debug stat rendering
	unsigned int mNumScreenShots;			///< Number of screenshots taken

public:

    /** Constructor.
	*/
    Application();

    /** Destructor.
	*/
    virtual ~Application();

	/** Runs the Application
	*/
	void go(void);

protected:

    /** Sets up the application.
		Returns false if the user chooses to abandon configuration.
	*/
    bool setup(void);

    /** Configures the application.
		Returns false if the user chooses to abandon configuration.
	*/
    bool configure(void);

    /** Defines the sources/paths for resources.
	*/
    void setupResources(void);

    /** Process frame start data.
		Overrides frameStarted in FrameListener.
	*/
    bool frameStarted(const FrameEvent& evt);

    /** Process frame end data.
		Overrides frameEnded in FrameListener.
	*/
    bool frameEnded(const FrameEvent& evt);

    /** Processes unbuffered keyboard input.
		Returns true to continue rendering, false to quit.
	*/
    bool processUnbufferedKeyInput(void);

    /** Processes unbuffered mouse input.
		Returns true to continue rendering, false to quit.
	*/
    bool processUnbufferedMouseInput(void);

    /** Updates the debug overlay stats.
	*/
    void updateStats(void);

	/** Shows/Hides an overlay.
	*/
	void showOverlay(const String& name, bool show);
};

// Application.h
#endif

⌨️ 快捷键说明

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