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

📄 scenemanager.h

📁 This code was developed by my techer. :D
💻 H
字号:
#ifndef COMPGRAF_SCENEMANAGER_H
#define COMPGRAF_SCENEMANAGER_H

#include "SDL.h"
#include "SDL_opengl.h"
#include <list>
using namespace std;

class Rendereable;

class SceneManager
{
public:
	static SceneManager* getInstance();
	~SceneManager();

	void update( float elapsedTime );
	void render();
	void freeSurface();
	void handleEvent(SDL_Event* sdlEvent);
	bool isRunning();

	void addObject( Rendereable* object );
private:
	SceneManager();
	SDL_Surface*	screen;

	bool running;

	static SceneManager* instance;
	void initPerspective();

	void handleKeyDown(SDL_KeyboardEvent* sdlKeyEvent);
	void handleKeyUp(SDL_KeyboardEvent* sdlKeyEvent);

	GLfloat rotSpeedWorld, rotSpeedXModel, rotSpeedYModel;
	GLfloat rotWorld, rotXModel, rotYModel;

	static const GLfloat ROT_SPEED;

	list<Rendereable*>	objectsList;
	Rendereable*		origin;
};

#endif

⌨️ 快捷键说明

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