VGearsUtility.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #pragma once
  16. #include "common/VGearsApplication.h"
  17. #include "common/OgreBase.h"
  18. namespace VGears{
  19. /**
  20. * Provides utilities for the application.
  21. */
  22. class Utility : public Application{
  23. public:
  24. /**
  25. * Constructor.
  26. *
  27. * @param[in] argc Number of arguments passed to the application.
  28. * @param[in] argv List of arguments passed to the application.
  29. */
  30. Utility(int argc, char *argv[]);
  31. /**
  32. * Destructor.
  33. */
  34. virtual ~Utility();
  35. /**
  36. * Retrieves the camera.
  37. *
  38. * @return The camera.
  39. */
  40. virtual Ogre::Camera* GetCamera(void);
  41. protected:
  42. /**
  43. * Initializes components used by the utilities.
  44. */
  45. virtual void InitComponents();
  46. /**
  47. * Initializes components used by the utilities.
  48. */
  49. virtual void DestroyComponents();
  50. private:
  51. /**
  52. * Constructor.
  53. */
  54. Utility();
  55. /**
  56. * The frame listener.
  57. */
  58. DisplayFrameListener *frame_listener_;
  59. /**
  60. * The application scene manager.
  61. */
  62. Ogre::SceneManager *scene_manager_;
  63. /**
  64. * The engine camera.
  65. */
  66. Ogre::Camera *camera_;
  67. /**
  68. * The engine viewport.
  69. */
  70. Ogre::Viewport *viewport_;
  71. };
  72. }