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

#include <camera.hpp>

Public Member Functions

 Sky ()
 
 Sky (const Sky &sky)=default
 
 Sky (Sky &&sky) noexcept=default
 
 ~Sky ()=default
 
Skyoperator= (const Sky &sky) noexcept=default
 
Skyoperator= (Sky &&sky) noexcept=default
 
TexturePtr GetTexture () const noexcept
 
ID3D11ShaderResourceView * GetSRV () const noexcept
 
void SetTexture (TexturePtr texture)
 
F32 GetScaleZ () const noexcept
 
void SetScaleZ (F32 scale_z) noexcept
 

Private Attributes

TexturePtr m_texture
 
F32 m_scale_z
 

Detailed Description

A class of sky domes.

Constructor & Destructor Documentation

◆ Sky() [1/3]

mage::rendering::Sky::Sky ( )

Constructs a sky.

◆ Sky() [2/3]

mage::rendering::Sky::Sky ( const Sky sky)
default

Constructs a sky from the given sky.

Parameters
[in]skyA reference to the sky to copy.

◆ Sky() [3/3]

mage::rendering::Sky::Sky ( Sky &&  sky)
defaultnoexcept

Constructs a sky by moving the given sky.

Parameters
[in]skyA reference to the sky to move.

◆ ~Sky()

mage::rendering::Sky::~Sky ( )
default

Destructs this sky.

Member Function Documentation

◆ GetScaleZ()

F32 mage::rendering::Sky::GetScaleZ ( ) const
noexcept

Returns the scaling factor of the z component of the sky domes of this sky.

Returns
The scaling factor of the z component of the sky domes of this sky.

◆ GetSRV()

ID3D11ShaderResourceView* mage::rendering::Sky::GetSRV ( ) const
noexcept

Returns the shader resource view of the texture of this sky.

Returns
nullptr, if this sky has no texture.
A pointer to the shader resource view of the texture of this sky.

◆ GetTexture()

TexturePtr mage::rendering::Sky::GetTexture ( ) const
noexcept

Returns the texture of this sky.

Returns
A pointer to the texture of this sky.

◆ operator=() [1/2]

Sky& mage::rendering::Sky::operator= ( const Sky sky)
defaultnoexcept

Copies the given sky to this sky.

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

◆ operator=() [2/2]

Sky& mage::rendering::Sky::operator= ( Sky &&  sky)
defaultnoexcept

Moves the given sky to this sky.

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

◆ SetScaleZ()

void mage::rendering::Sky::SetScaleZ ( F32  scale_z)
noexcept

Sets scaling factor of the z component of the sky domes of this sky to the given value.

Parameters
[in]scale_zThe scaling factor.

◆ SetTexture()

void mage::rendering::Sky::SetTexture ( TexturePtr  texture)

Sets the texture of this sky to the given texture.

Parameters
[in]textureThe texture of this sky.

Member Data Documentation

◆ m_scale_z

F32 mage::rendering::Sky::m_scale_z
private

The scaling factor of the z component of the sky domes of this sky.

◆ m_texture

TexturePtr mage::rendering::Sky::m_texture
private

The cube map texture of this sky.