Castor3D 0.12.0
Multiplatform 3D engine
Public Types | Public Member Functions | Static Public Attributes | List of all members
castor3d::EnvironmentMap Class Reference

#include <EnvironmentMap.hpp>

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

Public Types

using EnvironmentMapPasses = std::array< std::unique_ptr< EnvironmentMapPass >, size_t(CubeMapFace::eCount) >
 

Public Member Functions

C3D_API EnvironmentMap (crg::ResourceHandler &handler, RenderDevice const &device, QueueData const &queueData, Scene const &scene)
 Constructor. More...
 
C3D_API void cleanup ()
 Clears the passes. More...
 
C3D_API void update (CpuUpdater &updater)
 Updates the render pass, CPU wise. More...
 
C3D_API void update (GpuUpdater &updater)
 Updates the render pass, GPU wise. More...
 
C3D_API crg::SemaphoreWaitArray render (crg::SemaphoreWaitArray const &toWait, ashes::Queue const &queue)
 Renders the environment map. More...
 
C3D_API void addNode (SceneNode &node)
 Creates a reflection map for given node. More...
 
C3D_API void removeNode (SceneNode &node)
 Creates a reflection map for given node. More...
 
C3D_API bool hasNode (SceneNode &node) const
 
C3D_API uint32_t getIndex (SceneNode const &node) const
 
VkExtent3D const & getSize () const
 
Texture const & getColourId () const
 
VkImageView getColourView (uint32_t index) const
 
crg::ImageViewId getColourViewId (uint32_t index, CubeMapFace face) const
 
crg::ImageViewId getDepthViewId (uint32_t index, CubeMapFace face) const
 

Static Public Attributes

static C3D_API uint32_t const Count
 
static C3D_API uint32_t const Size
 

Member Typedef Documentation

◆ EnvironmentMapPasses

using castor3d::EnvironmentMap::EnvironmentMapPasses = std::array< std::unique_ptr< EnvironmentMapPass >, size_t( CubeMapFace::eCount ) >

Constructor & Destructor Documentation

◆ EnvironmentMap()

C3D_API castor3d::EnvironmentMap::EnvironmentMap ( crg::ResourceHandler &  handler,
RenderDevice const &  device,
QueueData const &  queueData,
Scene const &  scene 
)

Constructor.

Parameters
[in]handlerThe render graph resources handler.
[in]deviceThe GPU device.
[in]queueDataThe queue receiving the initialisation commands.
[in]sceneThe scene.

Member Function Documentation

◆ addNode()

C3D_API void castor3d::EnvironmentMap::addNode ( SceneNode node)

Creates a reflection map for given node.

Parameters
[in]nodeThe scene node from which the reflection map is generated.

◆ cleanup()

C3D_API void castor3d::EnvironmentMap::cleanup ( )

Clears the passes.

◆ getColourId()

Texture const & castor3d::EnvironmentMap::getColourId ( ) const
inline

◆ getColourView()

VkImageView castor3d::EnvironmentMap::getColourView ( uint32_t  index) const
inline

◆ getColourViewId()

crg::ImageViewId castor3d::EnvironmentMap::getColourViewId ( uint32_t  index,
CubeMapFace  face 
) const
inline

◆ getDepthViewId()

crg::ImageViewId castor3d::EnvironmentMap::getDepthViewId ( uint32_t  index,
CubeMapFace  face 
) const
inline

◆ getIndex()

C3D_API uint32_t castor3d::EnvironmentMap::getIndex ( SceneNode const &  node) const
Remarks
Call hasEnvironmentMap before calling this function (since this one returns a reference to an existing EnvironmentMap).
Returns
Retrieves the reflection map for given node.
Parameters
[in]nodeThe scene node.

◆ getSize()

VkExtent3D const & castor3d::EnvironmentMap::getSize ( ) const
inline

name Getters.

◆ hasNode()

C3D_API bool castor3d::EnvironmentMap::hasNode ( SceneNode node) const
Returns
Tells if there is a reflection map for given node.
Parameters
[in]nodeThe scene node.

◆ removeNode()

C3D_API void castor3d::EnvironmentMap::removeNode ( SceneNode node)

Creates a reflection map for given node.

Parameters
[in]nodeThe scene node from which the reflection map is generated.

◆ render()

C3D_API crg::SemaphoreWaitArray castor3d::EnvironmentMap::render ( crg::SemaphoreWaitArray const &  toWait,
ashes::Queue const &  queue 
)

Renders the environment map.

Parameters
[in]toWaitThe semaphores to wait.
[in]queueThe queue receiving the render commands.
Returns
The semaphores signaled by this render.

◆ update() [1/2]

C3D_API void castor3d::EnvironmentMap::update ( CpuUpdater updater)

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

C3D_API void castor3d::EnvironmentMap::update ( GpuUpdater updater)

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

Member Data Documentation

◆ Count

C3D_API uint32_t const castor3d::EnvironmentMap::Count
static

◆ Size

C3D_API uint32_t const castor3d::EnvironmentMap::Size
static

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