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

#include <ambient_light.hpp>

Inheritance diagram for mage::rendering::AmbientLight:
mage::Component

Public Member Functions

 AmbientLight () noexcept
 
 AmbientLight (const AmbientLight &light) noexcept
 
 AmbientLight (AmbientLight &&light) noexcept
 
virtual ~AmbientLight ()
 
AmbientLightoperator= (const AmbientLight &light) noexcept
 
AmbientLightoperator= (AmbientLight &&light) noexcept
 
RGBGetBaseColor () noexcept
 
const RGBGetBaseColor () const noexcept
 
F32 GetRadiance () const noexcept
 
void SetRadiance (F32 radiance) noexcept
 
const RGB GetRadianceSpectrum () const noexcept
 
- Public Member Functions inherited from mage::Component
virtual ~Component ()
 
Componentoperator= (const Component &component) noexcept
 
Componentoperator= (Component &&component) noexcept
 
State GetState () const noexcept
 
void SetState (State state) noexcept
 
U64 GetGuid () const noexcept
 
bool HasOwner () const noexcept
 
ProxyPtr< NodeGetOwner () noexcept
 
ProxyPtr< const NodeGetOwner () const noexcept
 

Private Attributes

RGB m_base_color
 
F32 m_radiance
 

Additional Inherited Members

- Protected Member Functions inherited from mage::Component
 Component () noexcept
 
 Component (const Component &component) noexcept
 
 Component (Component &&component) noexcept
 

Detailed Description

A class of ambient lights.

Constructor & Destructor Documentation

◆ AmbientLight() [1/3]

mage::rendering::AmbientLight::AmbientLight ( )
noexcept

Constructs an ambient light.

◆ AmbientLight() [2/3]

mage::rendering::AmbientLight::AmbientLight ( const AmbientLight light)
defaultnoexcept

Constructs an ambient light from the given ambient light.

Parameters
[in]lightA reference to the ambient light to copy.

◆ AmbientLight() [3/3]

mage::rendering::AmbientLight::AmbientLight ( AmbientLight &&  light)
defaultnoexcept

Constructs an ambient light by moving the given ambient light.

Parameters
[in]lightA reference to the ambient light to move.

◆ ~AmbientLight()

mage::rendering::AmbientLight::~AmbientLight ( )
virtualdefault

Destructs this ambient light.

Member Function Documentation

◆ GetBaseColor() [1/2]

RGB& mage::rendering::AmbientLight::GetBaseColor ( )
noexcept

Returns the (linear) base color of this ambient light.

Returns
A reference to the sRGB base color of this ambient light.

◆ GetBaseColor() [2/2]

const RGB& mage::rendering::AmbientLight::GetBaseColor ( ) const
noexcept

Returns the (linear) base color of this ambient light.

Returns
A reference to the sRGB base color of this ambient light.

◆ GetRadiance()

F32 mage::rendering::AmbientLight::GetRadiance ( ) const
noexcept

Returns the radiance of this ambient light.

Returns
The radiance in watts per square meter per steradians of this ambient light.

◆ GetRadianceSpectrum()

const RGB mage::rendering::AmbientLight::GetRadianceSpectrum ( ) const
noexcept

Returns the radiance spectrum of this ambient light.

Returns
The radiance spectrum of this ambient light.

◆ operator=() [1/2]

AmbientLight & mage::rendering::AmbientLight::operator= ( const AmbientLight light)
defaultnoexcept

Copies the given ambient light to this ambient light.

Parameters
[in]lightA reference to the ambient light to copy.
Returns
A reference to the copy of the given ambient light (i.e. this ambient light).

◆ operator=() [2/2]

AmbientLight & mage::rendering::AmbientLight::operator= ( AmbientLight &&  light)
defaultnoexcept

Moves the given ambient light to this ambient light.

Parameters
[in]lightA reference to the ambient light to move.
Returns
A reference to the moved ambient light (i.e. this ambient light).

◆ SetRadiance()

void mage::rendering::AmbientLight::SetRadiance ( F32  radiance)
noexcept

Sets the radiance of this ambient light to the given radiance.

Parameters
[in]radianceThe radiance in watts per square meter per steradians.

Member Data Documentation

◆ m_base_color

RGB mage::rendering::AmbientLight::m_base_color
private

The (linear) base color of this ambient light.

◆ m_radiance

F32 mage::rendering::AmbientLight::m_radiance
private

The radiance in watts per square meter per steradians of this ambient light.