GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::Fog3D Class Reference

Distance-based fog in 3D space. More...

#include <GREM/graphics_3d/Fog3D.hpp>

Classes

struct  Parameters
 Struct of shader parameters representing the fog's appearance. More...

Public Types

using ParameterBuffer = UniformBuffer<Parameters, "Fog3DParameters">
 Shader buffer for fog parameters.

Public Member Functions

 Fog3D (Device &device, const Fog3DOptions &options={})
 Construct a fog.
void setFog (const Fog3DOptions &newFogOptions)
 Set the fog parameters.
Fog3DOptions getOptions () const noexcept
 Get the configuration options of the fog.

Detailed Description

Distance-based fog in 3D space.

Member Typedef Documentation

◆ ParameterBuffer

Shader buffer for fog parameters.

Constructor & Destructor Documentation

◆ Fog3D()

grem::graphics::Fog3D::Fog3D ( Device & device,
const Fog3DOptions & options = {} )
explicit

Construct a fog.

Parameters
devicedevice to create the fog for. Must outlive the fog.
optionsfog options, see Fog3DOptions.

Member Function Documentation

◆ setFog()

void grem::graphics::Fog3D::setFog ( const Fog3DOptions & newFogOptions)

Set the fog parameters.

Parameters
newFogOptionsfog options, see Fog3DOptions.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ getOptions()

Fog3DOptions grem::graphics::Fog3D::getOptions ( ) const
inlinenodiscardnoexcept

Get the configuration options of the fog.

Returns
the current configuration options.

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