MAGE  v0.171.0
Matthias Advanced Game Engine
mage::rendering::Fog Class Reference

#include <camera.hpp>

Public Member Functions

constexpr Fog () noexcept
 
constexpr Fog (const Fog &fog) noexcept=default
 
constexpr Fog (Fog &&fog) noexcept=default
 
 ~Fog ()=default
 
Fogoperator= (const Fog &fog) noexcept=default
 
Fogoperator= (Fog &&fog) noexcept=default
 
constexpr RGBGetBaseColor () noexcept
 
constexpr const RGBGetBaseColor () const noexcept
 
constexpr F32 GetDensity () const noexcept
 
constexpr void SetDensity (F32 density) noexcept
 

Private Attributes

RGB m_base_color
 
F32 m_density
 

Detailed Description

A class of fog with respect to the camera position (eye) to avoid popping artifacts while moving.

Constructor & Destructor Documentation

◆ Fog() [1/3]

constexpr mage::rendering::Fog::Fog ( )
noexcept

Constructs a fog.

◆ Fog() [2/3]

constexpr mage::rendering::Fog::Fog ( const Fog fog)
defaultnoexcept

Constructs a fog from the given fog.

Parameters
[in]fogA reference to the fog to copy.

◆ Fog() [3/3]

constexpr mage::rendering::Fog::Fog ( Fog &&  fog)
defaultnoexcept

Constructs a fog by moving the given fog.

Parameters
[in]fogA reference to the fog to move.

◆ ~Fog()

mage::rendering::Fog::~Fog ( )
default

Destructs this fog.

Member Function Documentation

◆ GetBaseColor() [1/2]

constexpr RGB& mage::rendering::Fog::GetBaseColor ( )
noexcept

Returns the (linear) base color of this fog.

Returns
A reference to the sRGB base color of this fog.

◆ GetBaseColor() [2/2]

constexpr const RGB& mage::rendering::Fog::GetBaseColor ( ) const
noexcept

Returns the (linear) base color of this fog.

Returns
A reference to the sRGB base color of this fog.

◆ GetDensity()

constexpr F32 mage::rendering::Fog::GetDensity ( ) const
noexcept

Returns the density of this fog.

Returns
The density of this fog.

◆ operator=() [1/2]

Fog& mage::rendering::Fog::operator= ( const Fog fog)
defaultnoexcept

Copies the given fog to this fog.

Parameters
[in]fogA reference to the fog to copy.
Returns
A reference to the copy of the given fog (i.e. this fog).

◆ operator=() [2/2]

Fog& mage::rendering::Fog::operator= ( Fog &&  fog)
defaultnoexcept

Moves the given fog to this fog.

Parameters
[in]fogA reference to the fog to move.
Returns
A reference to the moved fog (i.e. this fog).

◆ SetDensity()

constexpr void mage::rendering::Fog::SetDensity ( F32  density)
noexcept

Sets the density of this fog to the given value.

Parameters
[in]densityThe density.

Member Data Documentation

◆ m_base_color

RGB mage::rendering::Fog::m_base_color
private

The (linear) base color of this fog.

◆ m_density

F32 mage::rendering::Fog::m_density
private

The density of this fog.