BsCSkybox.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsSkybox.h"
  6. #include "BsComponent.h"
  7. namespace bs
  8. {
  9. /** @addtogroup Components
  10. * @{
  11. */
  12. /**
  13. * @copydoc Skybox
  14. *
  15. * Wraps Skybox as a Component.
  16. */
  17. class BS_CORE_EXPORT CSkybox : public Component
  18. {
  19. public:
  20. CSkybox(const HSceneObject& parent);
  21. virtual ~CSkybox();
  22. /** @copydoc Skybox::getTexture */
  23. HTexture getTexture() const { return mInternal->getTexture(); }
  24. /** @copydoc Skybox::setTexture */
  25. void setTexture(const HTexture& texture) { mInternal->setTexture(texture); }
  26. /** @name Internal
  27. * @{
  28. */
  29. /** Returns the skybox that this component wraps. */
  30. SPtr<Skybox> _getSkybox() const { return mInternal; }
  31. /** @} */
  32. protected:
  33. mutable SPtr<Skybox> mInternal;
  34. /************************************************************************/
  35. /* COMPONENT OVERRIDES */
  36. /************************************************************************/
  37. protected:
  38. friend class SceneObject;
  39. /** @copydoc Component::onInitialized */
  40. void onInitialized() override;
  41. /** @copydoc Component::update */
  42. void update() override { }
  43. /************************************************************************/
  44. /* RTTI */
  45. /************************************************************************/
  46. public:
  47. friend class CSkyboxRTTI;
  48. static RTTITypeBase* getRTTIStatic();
  49. RTTITypeBase* getRTTI() const override;
  50. protected:
  51. CSkybox(); // Serialization only
  52. };
  53. /** @} */
  54. }