Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::SkyboxBackground Class Reference

#include <Skybox.hpp>

Inheritance diagram for castor3d::SkyboxBackground:
Inheritance graph
[legend]
Collaboration diagram for castor3d::SkyboxBackground:
Collaboration graph
[legend]

Public Member Functions

C3D_API SkyboxBackground (Engine &engine, Scene &scene, castor::String const &name=castor::String{})
 Constructor. More...
 
C3D_API void loadLeftImage (castor::Path const &folder, castor::Path const &relative)
 Sets the skybox's left face texture. More...
 
C3D_API void loadRightImage (castor::Path const &folder, castor::Path const &relative)
 Sets the skybox's right face texture. More...
 
C3D_API void loadTopImage (castor::Path const &folder, castor::Path const &relative)
 Sets the skybox's top face texture. More...
 
C3D_API void loadBottomImage (castor::Path const &folder, castor::Path const &relative)
 Sets the skybox's bottom face texture. More...
 
C3D_API void loadFrontImage (castor::Path const &folder, castor::Path const &relative)
 Sets the skybox's front face texture. More...
 
C3D_API void loadBackImage (castor::Path const &folder, castor::Path const &relative)
 Sets the skybox's back face texture. More...
 
C3D_API void loadFaceImage (castor::Path const &folder, castor::Path const &relative, CubeMapFace face)
 Sets a skybox's face texture. More...
 
C3D_API void setFaceTexture (castor::Path const &folder, castor::Path const &relative, CubeMapFace face)
 Sets a skybox's face texture. More...
 
C3D_API void setEquiTexture (TextureLayoutSPtr texture, uint32_t size)
 Sets the skybox's equirectangular texture. More...
 
C3D_API void loadEquiTexture (castor::Path const &folder, castor::Path const &relative, uint32_t size)
 Sets the skybox's equirectangular texture. More...
 
C3D_API void setEquiSize (uint32_t size)
 Sets the size of the skybox generated from the equirectangular texture. More...
 
C3D_API void loadCrossTexture (castor::Path const &folder, castor::Path const &relative)
 Sets the skybox's cross texture. More...
 
C3D_API void setCrossTexture (TextureLayoutSPtr texture)
 Sets the skybox's cross texture. More...
 
C3D_API void accept (BackgroundVisitor &visitor) override
 Visitor acceptance function. More...
 
castor::Path const & getEquiTexturePath () const
 
castor::Size const & getEquiSize () const
 
castor::Path const & getCrossTexturePath () const
 
void setTexture (TextureLayoutSPtr texture)
 
- Public Member Functions inherited from castor3d::SceneBackground
C3D_API SceneBackground (Engine &engine, Scene &scene, castor::String const &name, BackgroundType type)
 Constructor. More...
 
virtual C3D_API ~SceneBackground ()
 Destructor. More...
 
C3D_API bool initialise (RenderDevice const &device)
 Initialisation function. More...
 
C3D_API void cleanup (RenderDevice const &device)
 Cleanup function. More...
 
C3D_API void update (CpuUpdater &updater) const
 Updates the background, CPU side. More...
 
C3D_API void update (GpuUpdater &updater) const
 Updates the background, GPU side. More...
 
C3D_API void notifyChanged ()
 Notifies a change to apply on GPU for the background. More...
 
virtual C3D_API void accept (BackgroundVisitor &visitor)=0
 Visitor acceptance function. More...
 
Scene const & getScene () const
 
ScenegetScene ()
 
BackgroundType getType () const
 
Texture const & getTextureId () const
 
TextureLayout const & getTexture () const
 
TextureLayoutgetTexture ()
 
ashes::Image const & getImage () const
 
ashes::ImageView const & getView () const
 
bool isHdr () const
 
bool isSRGB () const
 
bool hasIbl () const
 
bool isInitialised () const
 
IblTextures const & getIbl () const
 
Sampler const & getSampler () const
 

Additional Inherited Members

- Public Types inherited from castor3d::SceneBackground
enum  DescriptorIdx : uint32_t {
  MtxUboIdx = 0u , MdlMtxUboIdx = 1u , HdrCfgUboIdx = 2u , SceneUboIdx = 3u ,
  SkyBoxImgIdx = 4u
}
 
- Public Attributes inherited from castor3d::SceneBackground
OnBackgroundChanged onChanged
 
- Protected Attributes inherited from castor3d::SceneBackground
Scenem_scene
 
BackgroundType m_type
 
std::atomic_bool m_initialised { false }
 
bool m_hdr { true }
 
bool m_srgb { false }
 
Texture m_textureId
 
TextureLayoutSPtr m_texture
 
SamplerResPtr m_sampler
 
std::unique_ptr< IblTexturesm_ibl
 

Constructor & Destructor Documentation

◆ SkyboxBackground()

C3D_API castor3d::SkyboxBackground::SkyboxBackground ( Engine engine,
Scene scene,
castor::String const &  name = castor::String{} 
)
explicit

Constructor.

Parameters
[in]engineThe engine.
[in]sceneThe parent scene.
nameThe background name.

Member Function Documentation

◆ accept()

C3D_API void castor3d::SkyboxBackground::accept ( BackgroundVisitor visitor)
overridevirtual

Visitor acceptance function.

Parameters
visitorThe visitor.

Implements castor3d::SceneBackground.

◆ getCrossTexturePath()

castor::Path const & castor3d::SkyboxBackground::getCrossTexturePath ( ) const
inline

◆ getEquiSize()

castor::Size const & castor3d::SkyboxBackground::getEquiSize ( ) const
inline

◆ getEquiTexturePath()

castor::Path const & castor3d::SkyboxBackground::getEquiTexturePath ( ) const
inline

name Getters.

◆ loadBackImage()

C3D_API void castor3d::SkyboxBackground::loadBackImage ( castor::Path const &  folder,
castor::Path const &  relative 
)

Sets the skybox's back face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.

◆ loadBottomImage()

C3D_API void castor3d::SkyboxBackground::loadBottomImage ( castor::Path const &  folder,
castor::Path const &  relative 
)

Sets the skybox's bottom face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.

◆ loadCrossTexture()

C3D_API void castor3d::SkyboxBackground::loadCrossTexture ( castor::Path const &  folder,
castor::Path const &  relative 
)

Sets the skybox's cross texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.

◆ loadEquiTexture()

C3D_API void castor3d::SkyboxBackground::loadEquiTexture ( castor::Path const &  folder,
castor::Path const &  relative,
uint32_t  size 
)

Sets the skybox's equirectangular texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.
[in]sizeThe wanted skybox dimensions.

◆ loadFaceImage()

C3D_API void castor3d::SkyboxBackground::loadFaceImage ( castor::Path const &  folder,
castor::Path const &  relative,
CubeMapFace  face 
)

Sets a skybox's face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.
[in]faceThe face into which the image will be loaded.

◆ loadFrontImage()

C3D_API void castor3d::SkyboxBackground::loadFrontImage ( castor::Path const &  folder,
castor::Path const &  relative 
)

Sets the skybox's front face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.

◆ loadLeftImage()

C3D_API void castor3d::SkyboxBackground::loadLeftImage ( castor::Path const &  folder,
castor::Path const &  relative 
)

Sets the skybox's left face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.

◆ loadRightImage()

C3D_API void castor3d::SkyboxBackground::loadRightImage ( castor::Path const &  folder,
castor::Path const &  relative 
)

Sets the skybox's right face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.

◆ loadTopImage()

C3D_API void castor3d::SkyboxBackground::loadTopImage ( castor::Path const &  folder,
castor::Path const &  relative 
)

Sets the skybox's top face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.

◆ setCrossTexture()

C3D_API void castor3d::SkyboxBackground::setCrossTexture ( TextureLayoutSPtr  texture)

Sets the skybox's cross texture.

Parameters
[in]textureThe texture.

◆ setEquiSize()

C3D_API void castor3d::SkyboxBackground::setEquiSize ( uint32_t  size)

Sets the size of the skybox generated from the equirectangular texture.

Parameters
[in]sizeThe wanted skybox dimensions.

◆ setEquiTexture()

C3D_API void castor3d::SkyboxBackground::setEquiTexture ( TextureLayoutSPtr  texture,
uint32_t  size 
)

Sets the skybox's equirectangular texture.

Parameters
[in]textureThe texture.
[in]sizeThe wanted skybox dimensions.

◆ setFaceTexture()

C3D_API void castor3d::SkyboxBackground::setFaceTexture ( castor::Path const &  folder,
castor::Path const &  relative,
CubeMapFace  face 
)

Sets a skybox's face texture.

Parameters
[in]folderThe image folder.
[in]relativeThe image file path, relative to folder.
[in]faceThe face into which the image will be loaded.

◆ setTexture()

void castor3d::SkyboxBackground::setTexture ( TextureLayoutSPtr  texture)
inline

name Mutators.

References castor3d::SceneBackground::m_texture.


The documentation for this class was generated from the following file: