1. #ifndef _APPLICATIONMANAGER_H__
  2. #define _APPLICATIONMANAGER_H__
  3.  
  4. #include "Irrlicht.h"
  5.  
  6. using namespace irr;
  7. using namespace core;
  8. using namespace scene;
  9. using namespace video;
  10. using namespace io;
  11. using namespace gui;
  12.  
  13. #define APPLICATIONMANAGER ApplicationManager::Instance()
  14.  
  15. enum CurrentDemo
  16. {
  17. NONE,
  18. HELLOWORLD,
  19. MODEL,
  20. LIGHTING,
  21. PARTICLE,
  22. TERRAIN
  23. };
  24.  
  25. class ApplicationManager :
  26. public IEventReceiver
  27. {
  28. public:
  29. ~ApplicationManager();
  30. static ApplicationManager& Instance()
  31. {
  32. static ApplicationManager instance;
  33. return instance;
  34. }
  35.  
  36. void Startup();
  37. void Shutdown();
  38.  
  39. bool OnEvent(const SEvent& event);
  40.  
  41. protected:
  42. ApplicationManager();
  43. void InitialiseVariables();
  44.  
  45. void ShutdownCurrentDemo();
  46.  
  47. void StartupModel();
  48. void ShutdownModel();
  49. void StartupLighting();
  50. void ShutdownLighting();
  51. void StartupParticles();
  52. void ShutdownParticles();
  53. void StartupTerrain();
  54. void ShutdownTerrain();
  55.  
  56. CurrentDemo currentDemo;
  57.  
  58. ICameraSceneNode* camera;
  59. ITerrainSceneNode* terrain;
  60. IParticleSystemSceneNode* particleSystem;
  61. IAnimatedMeshSceneNode* model;
  62. ILightSceneNode* light1;
  63. IBillboardSceneNode * billboard;
  64. };
  65.  
  66. #endif