Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | 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 = castor::Array< EnvironmentMapPassUPtr, size_t( CubeMapFace::eCount ) >
 

Public Member Functions

C3D_API EnvironmentMap (crg::ResourcesCache &resources, RenderDevice const &device, QueueData const &queueData, Scene &scene)
 Constructor.
 
C3D_API void cleanup () noexcept
 Clears the passes.
 
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)
 Renders the environment map.
 
C3D_API void addNode (SceneNode &node)
 Creates a reflection map for given node.
 
C3D_API void removeNode (SceneNode &node)
 Creates a reflection map for given node.
 
C3D_API bool hasNode (SceneNode &node) const
 
C3D_API uint32_t getIndex (SceneNode const &node) const
 
VkExtent3D const & getSize () const noexcept
 
ScenegetScene () const noexcept
 
Texture const & getColourId () const noexcept
 
VkImageView getColourView (uint32_t index) const noexcept
 
crg::ImageViewId getColourViewId (uint32_t index, CubeMapFace face) const noexcept
 
crg::ImageViewId getDepthViewId (uint32_t index, CubeMapFace face) const noexcept
 
crg::ImageViewId getTmpImage (uint32_t index, CubeMapFace face) const noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 

Member Typedef Documentation

◆ EnvironmentMapPasses

Constructor & Destructor Documentation

◆ EnvironmentMap()

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

Constructor.

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

Clears the passes.

◆ getColourId()

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

◆ getColourView()

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

◆ getColourViewId()

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

◆ getDepthViewId()

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

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

◆ getScene()

Scene & castor3d::EnvironmentMap::getScene ( ) const
inlinenoexcept

◆ getSize()

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

name Getters.

◆ getTmpImage()

crg::ImageViewId castor3d::EnvironmentMap::getTmpImage ( uint32_t index,
CubeMapFace face ) const
inlinenoexcept

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

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