Lugdunum  0.1.0
Classes | Public Member Functions | Private Attributes | List of all members
lug::Graphics::Graphics Class Reference

Class for graphics. More...

#include <Graphics.hpp>

Collaboration diagram for lug::Graphics::Graphics:
[legend]

Classes

struct  InitInfo
 Utility structure used to initialize the Graphics component. More...
 

Public Member Functions

 Graphics (const std::string &appName, const Core::Version &appVersion)
 Constructs a Graphics instance. More...
 
 Graphics (const Graphics &)=delete
 
 Graphics (Graphics &&)=delete
 
Graphicsoperator= (const Graphics &)=delete
 
Graphicsoperator= (Graphics &&)=delete
 
 ~Graphics ()=default
 
bool init (const InitInfo &initInfo)
 Initializes the application with the informations filled in initInfo structure. More...
 
bool beginInit (const InitInfo &initInfo)
 Begin the initialization of the application with the informations filled in initInfo structure. Just create the lug::Graphics::Renderer and begin its initialization. More...
 
bool finishInit ()
 Finish the initialization of the application with the informations filled in initInfo structure. Finish the initialization of the lug::Graphics::Renderer. More...
 
bool isModuleLoaded (Module::Type type) const
 Check if a module is loaded. More...
 
const std::set< Module::Type > & getLoadedMandatoryModules () const
 
const std::set< Module::Type > & getLoadedOptionalModules () const
 
void unsupportedModule (Module::Type type)
 
RenderergetRenderer () const
 Gets the renderer. More...
 

Private Attributes

std::string _appName
 
Core::Version _appVersion
 
InitInfo _initInfo
 
std::set< Module::Type_loadedMandatoryModules {}
 
std::set< Module::Type_loadedOptionalModules {}
 
std::unique_ptr< Renderer_renderer {nullptr}
 

Detailed Description

Class for graphics.

This class is the root class of the 3D engine. It handles modules, will create the Graphics::Renderer based on the rendererType given in the Graphics::InitInfo structure.

Definition at line 25 of file Graphics.hpp.

Constructor & Destructor Documentation

◆ Graphics() [1/3]

lug::Graphics::Graphics::Graphics ( const std::string &  appName,
const Core::Version appVersion 
)

Constructs a Graphics instance.

Parameters
[in]appNameThe application name.
[in]appVersionThe application version.

Definition at line 15 of file Graphics.cpp.

◆ Graphics() [2/3]

lug::Graphics::Graphics::Graphics ( const Graphics )
delete

◆ Graphics() [3/3]

lug::Graphics::Graphics::Graphics ( Graphics &&  )
delete

◆ ~Graphics()

lug::Graphics::Graphics::~Graphics ( )
default

Member Function Documentation

◆ operator=() [1/2]

Graphics& lug::Graphics::Graphics::operator= ( const Graphics )
delete

◆ operator=() [2/2]

Graphics& lug::Graphics::Graphics::operator= ( Graphics &&  )
delete

◆ init()

bool lug::Graphics::Graphics::init ( const InitInfo initInfo)

Initializes the application with the informations filled in initInfo structure.

Parameters
[in]initInfoThe initialize information.
Returns
true if the initialization was successful.

Definition at line 17 of file Graphics.cpp.

◆ beginInit()

bool lug::Graphics::Graphics::beginInit ( const InitInfo initInfo)

Begin the initialization of the application with the informations filled in initInfo structure. Just create the lug::Graphics::Renderer and begin its initialization.

Parameters
[in]initInfoThe initialize information.
Returns
true if the initialization was successful.

Definition at line 21 of file Graphics.cpp.

◆ finishInit()

bool lug::Graphics::Graphics::finishInit ( )

Finish the initialization of the application with the informations filled in initInfo structure. Finish the initialization of the lug::Graphics::Renderer.

Returns
true if the initialization was successful.

Definition at line 43 of file Graphics.cpp.

◆ isModuleLoaded()

bool Graphics::isModuleLoaded ( Module::Type  type) const
inline

Check if a module is loaded.

Parameters
[in]typeThe module type to check.
Returns
true if the module is loaded.

Definition at line 1 of file Graphics.inl.

◆ getLoadedMandatoryModules()

const std::set< Module::Type > & Graphics::getLoadedMandatoryModules ( ) const
inline

Definition at line 8 of file Graphics.inl.

◆ getLoadedOptionalModules()

const std::set< Module::Type > & Graphics::getLoadedOptionalModules ( ) const
inline

Definition at line 12 of file Graphics.inl.

◆ unsupportedModule()

void lug::Graphics::Graphics::unsupportedModule ( Module::Type  type)

Definition at line 75 of file Graphics.cpp.

◆ getRenderer()

Renderer * Graphics::getRenderer ( ) const
inline

Gets the renderer.

Returns
A raw pointer to the renderer instance.

Definition at line 16 of file Graphics.inl.

Member Data Documentation

◆ _appName

std::string lug::Graphics::Graphics::_appName
private

Definition at line 103 of file Graphics.hpp.

◆ _appVersion

Core::Version lug::Graphics::Graphics::_appVersion
private

Definition at line 104 of file Graphics.hpp.

◆ _initInfo

InitInfo lug::Graphics::Graphics::_initInfo
private

Definition at line 106 of file Graphics.hpp.

◆ _loadedMandatoryModules

std::set<Module::Type> lug::Graphics::Graphics::_loadedMandatoryModules {}
private

Definition at line 108 of file Graphics.hpp.

◆ _loadedOptionalModules

std::set<Module::Type> lug::Graphics::Graphics::_loadedOptionalModules {}
private

Definition at line 109 of file Graphics.hpp.

◆ _renderer

std::unique_ptr<Renderer> lug::Graphics::Graphics::_renderer {nullptr}
private

Definition at line 111 of file Graphics.hpp.


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