#include <renderskyboxcomponent.h>
Public Member Functions | |
| RenderSkyBoxComponentInstance (EntityInstance &entity, Component &resource) | |
| virtual bool | init (utility::ErrorState &errorState) override |
| void | setTexture (const TextureCube &texture) |
| const TextureCube & | getTexture () const |
| void | setColor (const glm::vec3 &color) |
| const glm::vec3 & | getColor () const |
| void | setOpacity (float opacity) |
| float | getOpacity () const |
Public Member Functions inherited from RenderableComponentInstance | |
| RenderableComponentInstance (EntityInstance &entity, Component &resource) | |
| void | draw (IRenderTarget &renderTarget, VkCommandBuffer commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix) |
| void | setVisible (bool visible) |
| bool | isVisible () const |
| const std::vector< ResourcePtr< RenderTag > > & | getTags () const |
| RenderMask | getMask () const |
| bool | includesMask (RenderMask otherMask) |
| int | getRank () const |
| const RenderLayer * | getLayer () const |
| virtual bool | isSupported (nap::CameraComponentInstance &camera) const |
Public Member Functions inherited from ComponentInstance | |
| ComponentInstance (EntityInstance &entity, Component &resource) | |
| virtual void | update (double deltaTime) |
| nap::EntityInstance * | getEntityInstance () const |
| nap::Component * | getComponent () const |
| template<typename T > | |
| T * | getComponent () const |
| virtual bool | init (utility::ErrorState &errorState) |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual void | onDestroy () |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Protected Member Functions | |
| void | onDraw (IRenderTarget &renderTarget, VkCommandBuffer commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix) override |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Attributes inherited from RenderableComponentInstance | |
| RenderService * | mRenderService = nullptr |
Instance part of RenderSkyBoxComponent
Renders a skybox using a cube texture. Creates a nap::BoxMesh with front-face culling enabled internally. The default skybox shader negates the translational component of the view matrix to fake unlimited depth. This object should be rendered first to fill the background; to do this, ensure it is in the back layer. You may also want to exclude this object from a shadow rendering pass using tags. The shader variables are set automatically from this component's properties.
| RenderSkyBoxComponentInstance | ( | EntityInstance & | entity, |
| Component & | resource | ||
| ) |
| const glm::vec3& getColor | ( | ) | const |
| float getOpacity | ( | ) | const |
| const TextureCube& getTexture | ( | ) | const |
Get the current sky box texture
|
overridevirtual |
Initializes the skybox render component, including required materials, meshes and bindings.
| errorState | contains the error when initialization fails |
Reimplemented from RenderableComponentInstance.
|
overrideprotectedvirtual |
Draws the skybox to the given render target
Implements RenderableComponentInstance.
| void setColor | ( | const glm::vec3 & | color | ) |
Set the sky box color
| color | new skybox color |
| void setOpacity | ( | float | opacity | ) |
Set the sky box opacity
| opacity | new sky box opacity |
| void setTexture | ( | const TextureCube & | texture | ) |
Update the sky box cube texture
| texture | the new skybox texture |