Castor3D 0.16.0
Multiplatform 3D engine
Classes | Public Types | Public Member Functions | Protected Member Functions | 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  AllPasses
 
struct  PassData
 
struct  Passes
 

Public Types

using PassDataPtr = castor::RawUniquePtr< PassData >
 

Public Member Functions

C3D_API ShadowMap (crg::ResourcesCache &resources, RenderDevice const &device, Scene &scene, LightType lightType, VkImageCreateFlags createFlags, castor::Size const &size, uint32_t layerCount, uint32_t count)
 Constructor.
 
virtual C3D_API ~ShadowMap () noexcept=default
 Destructor.
 
C3D_API void accept (ConfigurationVisitorBase &visitor)
 Visitor acceptance function.
 
C3D_API void update (CpuUpdater &updater)
 Updates the render pass, CPU wise.
 
C3D_API void update (GpuUpdater &updater)
 Updates the render pass, GPU wise.
 
C3D_API crg::SemaphoreWaitArray render (crg::SemaphoreWaitArray const &toWait, ashes::Queue const &queue, uint32_t index)
 Renders the shadow map.
 
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 (bool isStatic) const noexcept
 
ShadowMapResultgetShadowPassResult (bool isStatic) noexcept
 
ScenegetScene () const noexcept
 
uint32_t getCount () const noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Protected Member Functions

C3D_API void doRegisterGraphIO (crg::FramePassGroup &graph, bool vsm, bool rsm, bool isStatic) const
 
C3D_API bool doEnableCopyStatic (uint32_t index) const
 
C3D_API bool doEnableBlur (uint32_t index) const
 
- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 

Protected Attributes

RenderDevice const & m_device
 
crg::ResourcesCache & m_resources
 
Scenem_scene
 
castor::String m_name
 
LightType m_lightType
 
ShadowMapResult m_staticsResult
 
ShadowMapResult m_result
 
uint32_t m_count
 
castor::Array< AllPasses, 4u > m_passes
 
uint32_t m_passesIndex {}
 

Member Typedef Documentation

◆ PassDataPtr

Constructor & Destructor Documentation

◆ ShadowMap()

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

Constructor.

Parameters
[in]resourcesThe 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 ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ accept()

C3D_API void castor3d::ShadowMap::accept ( ConfigurationVisitorBase & visitor)

Visitor acceptance function.

Parameters
visitorThe visitor.

◆ doEnableBlur()

C3D_API bool castor3d::ShadowMap::doEnableBlur ( uint32_t index) const
protected

◆ doEnableCopyStatic()

C3D_API bool castor3d::ShadowMap::doEnableCopyStatic ( uint32_t index) const
protected

◆ doRegisterGraphIO()

C3D_API void castor3d::ShadowMap::doRegisterGraphIO ( crg::FramePassGroup & graph,
bool vsm,
bool rsm,
bool isStatic ) const
protected

◆ getClearValues()

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

name Getters.

◆ getCount()

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

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
inlinenoexcept

References m_scene.

◆ getShadowPassResult() [1/2]

ShadowMapResult const & castor3d::ShadowMap::getShadowPassResult ( bool isStatic) const
inlinenoexcept

References m_result, and m_staticsResult.

◆ getShadowPassResult() [2/2]

ShadowMapResult & castor3d::ShadowMap::getShadowPassResult ( bool isStatic)
inlinenoexcept

References m_result, and m_staticsResult.

◆ 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]

C3D_API void castor3d::ShadowMap::update ( GpuUpdater & updater)

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

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_lightType

LightType castor3d::ShadowMap::m_lightType
protected

◆ m_name

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

◆ m_passes

castor::Array< AllPasses, 4u > castor3d::ShadowMap::m_passes
protected

◆ m_passesIndex

uint32_t castor3d::ShadowMap::m_passesIndex {}
protected

◆ m_resources

crg::ResourcesCache& castor3d::ShadowMap::m_resources
protected

◆ m_result

ShadowMapResult castor3d::ShadowMap::m_result
protected

◆ m_scene

Scene& castor3d::ShadowMap::m_scene
protected

Referenced by getScene().

◆ m_staticsResult

ShadowMapResult castor3d::ShadowMap::m_staticsResult
protected

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