Castor3D 0.12.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
castor3d::ShadowMap Class Referenceabstract

#include <ShadowMap.hpp>

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

Classes

struct  PassData
 

Public Types

using PassDataPtr = std::unique_ptr< PassData >
 

Public Member Functions

C3D_API ShadowMap (crg::ResourceHandler &handler, RenderDevice const &device, Scene &scene, LightType lightType, VkImageCreateFlags createFlags, castor::Size const &size, uint32_t layerCount, uint32_t count)
 Constructor. More...
 
virtual C3D_API ~ShadowMap ()=default
 Destructor. More...
 
C3D_API void accept (PipelineVisitorBase &visitor)
 Visitor acceptance function. More...
 
C3D_API void update (CpuUpdater &updater)
 Updates the render pass, CPU wise. More...
 
virtual C3D_API void update (GpuUpdater &updater)=0
 Updates the render pass, GPU wise. More...
 
C3D_API crg::SemaphoreWaitArray render (crg::SemaphoreWaitArray const &toWait, ashes::Queue const &queue, uint32_t index)
 Renders the shadow map. More...
 
C3D_API ashes::VkClearValueArray const & getClearValues () const
 
C3D_API ashes::Sampler const & getSampler (SmTexture texture, uint32_t index=0u) const
 
virtual C3D_API crg::ImageViewId getView (SmTexture texture, uint32_t index=0u) const
 
virtual C3D_API crg::ImageViewIdArray getViews (SmTexture texture, uint32_t index=0u) const
 
ShadowMapResult const & getShadowPassResult () const
 
ShadowMapResultgetShadowPassResult ()
 
ScenegetScene () const
 
uint32_t getCount () const
 

Static Public Attributes

static constexpr TextureFlags textureFlags
 

Protected Attributes

RenderDevice const & m_device
 
crg::ResourceHandler & m_handler
 
Scenem_scene
 
castor::String m_name
 
LightType m_lightType
 
ShadowMapResult m_result
 
uint32_t m_count
 
std::set< std::reference_wrapper< GeometryBuffers > > m_geometryBuffers
 
std::vector< PassDataPtrm_passes
 
std::vector< std::unique_ptr< crg::FrameGraph > > m_graphs
 
std::vector< crg::RunnableGraphPtr > m_runnables
 

Member Typedef Documentation

◆ PassDataPtr

using castor3d::ShadowMap::PassDataPtr = std::unique_ptr< PassData >

Constructor & Destructor Documentation

◆ ShadowMap()

C3D_API castor3d::ShadowMap::ShadowMap ( crg::ResourceHandler &  handler,
RenderDevice const &  device,
Scene scene,
LightType  lightType,
VkImageCreateFlags  createFlags,
castor::Size const &  size,
uint32_t  layerCount,
uint32_t  count 
)

Constructor.

Parameters
[in]handlerThe render graph resources handler.
[in]deviceThe GPU device.
[in]sceneThe scene.
[in]lightTypeThe light source type.
[in]createFlagsThe result image create flags.
[in]sizeThe result image dimensions.
[in]layerCountThe result image layers count.
[in]countThe passes count.

◆ ~ShadowMap()

virtual C3D_API castor3d::ShadowMap::~ShadowMap ( )
virtualdefault

Destructor.

Member Function Documentation

◆ accept()

C3D_API void castor3d::ShadowMap::accept ( PipelineVisitorBase visitor)

Visitor acceptance function.

Parameters
visitorThe visitor.

◆ getClearValues()

C3D_API ashes::VkClearValueArray const & castor3d::ShadowMap::getClearValues ( ) const

name Getters.

◆ getCount()

uint32_t castor3d::ShadowMap::getCount ( ) const
inline

References m_count.

◆ getSampler()

C3D_API ashes::Sampler const & castor3d::ShadowMap::getSampler ( SmTexture  texture,
uint32_t  index = 0u 
) const

◆ getScene()

Scene & castor3d::ShadowMap::getScene ( ) const
inline

References m_scene.

◆ getShadowPassResult() [1/2]

ShadowMapResult & castor3d::ShadowMap::getShadowPassResult ( )
inline

References m_result.

◆ getShadowPassResult() [2/2]

ShadowMapResult const & castor3d::ShadowMap::getShadowPassResult ( ) const
inline

References m_result.

◆ getView()

virtual C3D_API crg::ImageViewId castor3d::ShadowMap::getView ( SmTexture  texture,
uint32_t  index = 0u 
) const
virtual

◆ getViews()

virtual C3D_API crg::ImageViewIdArray castor3d::ShadowMap::getViews ( SmTexture  texture,
uint32_t  index = 0u 
) const
virtual

◆ render()

C3D_API crg::SemaphoreWaitArray castor3d::ShadowMap::render ( crg::SemaphoreWaitArray const &  toWait,
ashes::Queue const &  queue,
uint32_t  index 
)

Renders the shadow map.

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

◆ update() [1/2]

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

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

virtual C3D_API void castor3d::ShadowMap::update ( GpuUpdater updater)
pure virtual

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

Implemented in castor3d::ShadowMapDirectional, castor3d::ShadowMapPoint, and castor3d::ShadowMapSpot.

Member Data Documentation

◆ m_count

uint32_t castor3d::ShadowMap::m_count
protected

Referenced by getCount().

◆ m_device

RenderDevice const& castor3d::ShadowMap::m_device
protected

◆ m_geometryBuffers

std::set< std::reference_wrapper< GeometryBuffers > > castor3d::ShadowMap::m_geometryBuffers
protected

◆ m_graphs

std::vector< std::unique_ptr< crg::FrameGraph > > castor3d::ShadowMap::m_graphs
protected

◆ m_handler

crg::ResourceHandler& castor3d::ShadowMap::m_handler
protected

◆ m_lightType

LightType castor3d::ShadowMap::m_lightType
protected

◆ m_name

castor::String castor3d::ShadowMap::m_name
protected

◆ m_passes

std::vector< PassDataPtr > castor3d::ShadowMap::m_passes
protected

◆ m_result

ShadowMapResult castor3d::ShadowMap::m_result
protected

◆ m_runnables

std::vector< crg::RunnableGraphPtr > castor3d::ShadowMap::m_runnables
protected

◆ m_scene

Scene& castor3d::ShadowMap::m_scene
protected

Referenced by getScene().

◆ textureFlags

constexpr TextureFlags castor3d::ShadowMap::textureFlags
staticconstexpr

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