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

#include <rendering_world.hpp>

Public Member Functions

 World (ID3D11Device &device, DisplayConfiguration &display_configuration, ResourceManager &resource_manager)
 
 World (const World &world)=delete
 
 World (World &&world) noexcept
 
virtual ~World ()
 
Worldoperator= (const World &world)=delete
 
Worldoperator= (World &&world) noexcept
 
template<typename ComponentT >
ProxyPtr< ComponentT > Create ()
 
template<typename ComponentT >
std::size_t GetNumberOf () const noexcept
 
template<typename ComponentT , typename ActionT >
void ForEach (ActionT &&action)
 
template<typename ComponentT , typename ActionT >
void ForEach (ActionT &&action) const
 
void Clear () noexcept
 

Private Attributes

std::reference_wrapper< ID3D11Device > m_device
 
std::reference_wrapper< DisplayConfigurationm_display_configuration
 
std::reference_wrapper< ResourceManagerm_resource_manager
 
AlignedVector< PerspectiveCameram_perspective_cameras
 
AlignedVector< OrthographicCameram_orthographic_cameras
 
AlignedVector< AmbientLightm_ambient_lights
 
AlignedVector< DirectionalLightm_directional_lights
 
AlignedVector< OmniLightm_omni_lights
 
AlignedVector< SpotLightm_spot_lights
 
AlignedVector< Modelm_models
 
AlignedVector< SpriteImagem_sprite_images
 
AlignedVector< SpriteTextm_sprite_texts
 

Detailed Description

A class of world.

Constructor & Destructor Documentation

◆ World() [1/3]

mage::rendering::World::World ( ID3D11Device &  device,
DisplayConfiguration display_configuration,
ResourceManager resource_manager 
)
explicit

Constructs a world.

Parameters
[in,out]deviceA reference to the device.
[in,out]display_configurationA reference to the display configuration.
[in,out]resource_managerA reference to the resource manager.

◆ World() [2/3]

mage::rendering::World::World ( const World world)
delete

Constructs a world from the given world.

Parameters
[in]worldA reference to the world.

◆ World() [3/3]

mage::rendering::World::World ( World &&  world)
defaultnoexcept

Constructs a world by moving the given world.

Parameters
[in]worldA reference to the world to move.

◆ ~World()

mage::rendering::World::~World ( )
virtualdefault

Destructs this world.

Member Function Documentation

◆ Clear()

void mage::rendering::World::Clear ( )
noexcept

Clears this world.

◆ Create()

template<typename ComponentT >
ProxyPtr< ComponentT > mage::rendering::World::Create ( )

◆ ForEach() [1/2]

template<typename ComponentT , typename ActionT >
void mage::rendering::World::ForEach ( ActionT &&  action)

◆ ForEach() [2/2]

template<typename ComponentT , typename ActionT >
void mage::rendering::World::ForEach ( ActionT &&  action) const

◆ GetNumberOf()

template<typename ComponentT >
std::size_t mage::rendering::World::GetNumberOf ( ) const
noexcept

◆ operator=() [1/2]

World& mage::rendering::World::operator= ( const World world)
delete

Copies the given world to this world.

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

◆ operator=() [2/2]

World & mage::rendering::World::operator= ( World &&  world)
defaultnoexcept

Moves the given world to this world.

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

Member Data Documentation

◆ m_ambient_lights

AlignedVector< AmbientLight > mage::rendering::World::m_ambient_lights
private

A vector containing the ambient lights of this world.

◆ m_device

std::reference_wrapper< ID3D11Device > mage::rendering::World::m_device
private

A reference to the device of this world.

◆ m_directional_lights

AlignedVector< DirectionalLight > mage::rendering::World::m_directional_lights
private

A vector containing the directional lights of this world.

◆ m_display_configuration

std::reference_wrapper< DisplayConfiguration > mage::rendering::World::m_display_configuration
private

A reference to the display configuration manager of this world.

◆ m_models

AlignedVector< Model > mage::rendering::World::m_models
private

A vector containing the models of this world.

◆ m_omni_lights

AlignedVector< OmniLight > mage::rendering::World::m_omni_lights
private

A vector containing the omni lights of this world.

◆ m_orthographic_cameras

AlignedVector< OrthographicCamera > mage::rendering::World::m_orthographic_cameras
private

A vector containing the orthographic cameras of this world.

◆ m_perspective_cameras

AlignedVector< PerspectiveCamera > mage::rendering::World::m_perspective_cameras
private

A vector containing the perspective cameras of this world.

◆ m_resource_manager

std::reference_wrapper< ResourceManager > mage::rendering::World::m_resource_manager
private

A reference to the resource manager of this world.

◆ m_spot_lights

AlignedVector< SpotLight > mage::rendering::World::m_spot_lights
private

A vector containing the spot lights of this world.

◆ m_sprite_images

AlignedVector< SpriteImage > mage::rendering::World::m_sprite_images
private

A vector containing the sprite images of this world.

◆ m_sprite_texts

AlignedVector< SpriteText > mage::rendering::World::m_sprite_texts
private

A vector containing the sprite texts of this world.