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

📄 demo.h

📁 Cal3D实现虚拟角色 Cal3D实现虚拟角色
💻 H
字号:
//----------------------------------------------------------------------------//// demo.h                                                                     //// Copyright (C) 2001 Bruno 'Beosil' Heidelberger                             ////----------------------------------------------------------------------------//// This program is free software; you can redistribute it and/or modify it    //// under the terms of the GNU General Public License as published by the Free //// Software Foundation; either version 2 of the License, or (at your option)  //// any later version.                                                         ////----------------------------------------------------------------------------//#ifndef DEMO_H#define DEMO_H//----------------------------------------------------------------------------//// Includes                                                                   ////----------------------------------------------------------------------------//#include "global.h"#include "CoreModel.h"
//----------------------------------------------------------------------------//// Class declaration                                                          ////----------------------------------------------------------------------------//class Demo{
// member variablesprotected:  int m_width;//窗口宽度  int m_height;//窗口高度  bool m_bFullscreen;//是否全屏模式  GLuint m_cursorTextureId;//光标纹理ID  GLuint m_logoTextureId;//LOGO纹理ID  GLuint m_fpsTextureId;//FPS纹理ID
  GLuint m_groundTextureId;//地面纹理ID
  int m_mouseX;//鼠标X坐标  int m_mouseY;//鼠标Y坐标
  bool m_bLeftMouseButtonDown;//鼠标左键按下  bool m_bRightMouseButtonDown;//鼠标右键按下  CoreModel* m_CoreModel;//核心模型  int m_currentCoreModel;//当前核心模型
  bool m_bPaused;//是否停止更新
  float m_fpsDuration;//
  int m_fpsFrames;//
  int m_fps;//
  unsigned int m_lastTick;//
  std::string m_strDatapath;//
  std::string m_strCal3D_Datapath;//
  float m_averageCPUTime;//  bool m_bOutputAverageCPUTimeAtExit;//
// constructors/destructorpublic:  Demo();  virtual ~Demo();// member functionspublic:  std::string getCaption();//得到窗口标题  std::string getDatapath();//设置窗口标题  bool getFullscreen();//查询是否全屏模式  int getHeight();//得到窗口高度  int getWidth();//得到窗口宽度  bool loadTexture(const std::string& strFllename, GLuint& pId);//加载纹理  bool onCreate(int argc, char *argv[]);//创建Demo  void onIdle();//空闲时间处理  bool onInit();//初始化Demo  void onKey(unsigned char key, int x, int y);//键盘处理函数  void onMouseButtonDown(int button, int x, int y);//鼠标按下处理函数  void onMouseButtonUp(int button, int x, int y);//鼠标抬起处理函数  void onMouseMove(int x, int y);//鼠标移动处理函数  void onRender();//渲染函数  void onShutdown();//退出函数  void setDimension(int width, int height);};extern Demo theDemo;#endif//----------------------------------------------------------------------------//

⌨️ 快捷键说明

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