Application.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // Urho3D Engine
  3. // Copyright (c) 2008-2011 Lasse Öörni
  4. //
  5. // Permission is hereby granted, free of charge, to any person obtaining a copy
  6. // of this software and associated documentation files (the "Software"), to deal
  7. // in the Software without restriction, including without limitation the rights
  8. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. // copies of the Software, and to permit persons to whom the Software is
  10. // furnished to do so, subject to the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be included in
  13. // all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. // THE SOFTWARE.
  22. //
  23. #ifndef TEST_APPLICATION_H
  24. #define TEST_APPLICATION_H
  25. #include "EventListener.h"
  26. #include "SharedPtr.h"
  27. #include <string>
  28. #include <vector>
  29. class AnimatedModel;
  30. class BillboardSet;
  31. class BorderImage;
  32. class Camera;
  33. class Channel;
  34. class DebugHud;
  35. class Engine;
  36. class Entity;
  37. class Geometry;
  38. class Light;
  39. class Material;
  40. class Model;
  41. class Node;
  42. class Octree;
  43. class ResourceCache;
  44. class RigidBody;
  45. class Scene;
  46. class Song;
  47. class Sound;
  48. class Text;
  49. class Texture2D;
  50. class TiXmlElement;
  51. class VolumeNode;
  52. class XMLFile;
  53. class Zone;
  54. class Application : public EventListener
  55. {
  56. public:
  57. Application(const std::vector<std::string>& arguments);
  58. ~Application();
  59. void run();
  60. private:
  61. void init();
  62. void createScene();
  63. void handleUpdate(StringHash eventType, VariantMap& eventData);
  64. void handlePostRenderUpdate(StringHash eventType, VariantMap& eventData);
  65. void handleMouseMove(StringHash eventType, VariantMap& eventData);
  66. void handleMouseButtonDown(StringHash eventType, VariantMap& eventData);
  67. void handleMouseButtonUp(StringHash eventType, VariantMap& eventData);
  68. std::vector<std::string> mArguments;
  69. SharedPtr<Engine> mEngine;
  70. SharedPtr<ResourceCache> mCache;
  71. SharedPtr<Scene> mScene;
  72. std::vector<Entity*> mAnimatingObjects;
  73. std::vector<Entity*> mLights;
  74. std::vector<Entity*> mBillboards;
  75. Entity* mCameraEntity;
  76. SharedPtr<Texture2D> mOcclusionDebugTexture;
  77. SharedPtr<BorderImage> mOcclusionDebugImage;
  78. };
  79. #endif // TEST_APPLICATION_H