| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsCorePrerequisites.h"
- #include "BsSkybox.h"
- #include "BsComponent.h"
- namespace bs
- {
- /** @addtogroup Components
- * @{
- */
- /**
- * @copydoc Skybox
- *
- * Wraps Skybox as a Component.
- */
- class BS_CORE_EXPORT CSkybox : public Component
- {
- public:
- CSkybox(const HSceneObject& parent);
- virtual ~CSkybox();
- /** @copydoc Skybox::getTexture */
- HTexture getTexture() const { return mInternal->getTexture(); }
- /** @copydoc Skybox::setTexture */
- void setTexture(const HTexture& texture) { mInternal->setTexture(texture); }
- /** @name Internal
- * @{
- */
- /** Returns the skybox that this component wraps. */
- SPtr<Skybox> _getSkybox() const { return mInternal; }
- /** @} */
- protected:
- mutable SPtr<Skybox> mInternal;
- /************************************************************************/
- /* COMPONENT OVERRIDES */
- /************************************************************************/
- protected:
- friend class SceneObject;
- /** @copydoc Component::onInitialized */
- void onInitialized() override;
- /** @copydoc Component::update */
- void update() override { }
- /************************************************************************/
- /* RTTI */
- /************************************************************************/
- public:
- friend class CSkyboxRTTI;
- static RTTITypeBase* getRTTIStatic();
- RTTITypeBase* getRTTI() const override;
- protected:
- CSkybox(); // Serialization only
- };
- /** @} */
- }
|