CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RendererScene Class Referencefinal

A class that represents a scene inside the renderer. More...

#include <CeresEngine/Renderer/RendererScene.hpp>

Inheritance diagram for CeresEngine::RendererScene:
CeresEngine::TRendererObject< RendererScene > CeresEngine::RendererObject

Public Member Functions

 ~RendererScene () final
 
void prepare (RendererContext &context)
 Prepares the scene for the rendering of the current frame.
 
RendererEnvironmentgetEnvironment () const noexcept
 A pointer to the sky environment for the scene.
 
template<typename T >
Tcreate ()
 Creates a new renderer object of the given type T.
 
const Vector< RendererCamera * > & getCameras ()
 Enumerates the currently registered cameras.
 
const Vector< RendererLight * > & getLights ()
 Enumerates the currently registered lights.
 
const Vector< RendererRenderable * > & getRenderables ()
 Enumerates the currently registered renderables.
 
const Vector< RendererTerrain * > & getTerrains ()
 Enumerates the currently registered terrains.
 
const Vector< RendererEnvironment * > & getEnvironments ()
 Enumerates the currently registered environments.
 
Generator< RendererGeometryenumerateGeometry (const RendererGeometryEnumerationRequest &enumerationRequest=RendererGeometryEnumerationRequest()) const
 
RenderergetRenderer () const
 The renderer that owns this manager instance.
 
bool isDirty () const noexcept
 If set to true, the scene is dirty and needs to be synchronized from the entity.
 
void markAsDirty () noexcept
 If set to true, the scene is dirty and needs to be synchronized from the entity.
 
const RendererSceneInfogetInfo () const
 A structure that holds renderer-specific information for the scene.
 
RendererSceneInfogetInfo ()
 A structure that holds renderer-specific information for the scene.
 
const GPUUniformBuffergetUniformBuffer () const
 The uniform buffer storing the scene GPU parameters used by the renderer.
 
- Public Member Functions inherited from CeresEngine::TRendererObject< RendererScene >
 TRendererObject (ManagerType &manager, Args &&... args)
 Creates a new TRendererObject instance.
 
void destroy () noexcept override
 Destroys the RendererObject.
 
ManagerTypegetManager () const noexcept
 The owning object manager.
 
- Public Member Functions inherited from CeresEngine::RendererObject
 RendererObject ()=default
 Creates a new RendererObject instance.
 
virtual ~RendererObject () noexcept=default
 Destroys an existing RendererObject instance.
 
RendererObjectID getID () const noexcept
 An identifier that uniquely identifies this object in the renderer.
 

Private Types

using super = TRendererObject< RendererScene >
 

Private Member Functions

template<typename T >
void add (T &object)
 Adds a new object to the scene.
 
template<typename T >
void remove (T &object)
 Removes an existing object from the scene.
 
void onSkyTextureChanged ()
 

Private Attributes

bool mDirty = true
 If set to true, the scene is dirty and needs to be synchronized from the entity.
 
RendererSceneInfo mInfo
 A structure that holds renderer-specific information for the scene.
 
GPUDynamicUniformBuffer< RendererSceneParamsmUniformBuffer
 The uniform buffer storing the scene GPU parameters used by the renderer.
 
Vector< RendererCamera * > mCameras
 The set of registered cameras with the renderer scene.
 
Vector< RendererLight * > mLights
 The set of registered lights with the renderer scene.
 
Vector< RendererRenderable * > mRenderables
 The set of registered renderables with the renderer scene.
 
Vector< RendererTerrain * > mTerrains
 The set of registered terrains with the renderer scene.
 
Vector< RendererEnvironment * > mEnvironments
 The set of registered terrains with the renderer scene.
 

Friends

template<typename , typename >
class TRendererSceneObject
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::RendererObject
Event< void(RendererObjectID newID)> willChangeID
 An event called whenever the object is about to change it's ID.
 
Event< void(RendererObjectID oldID)> didChangeID
 An event called whenever the object changes it's ID.
 
- Protected Attributes inherited from CeresEngine::TRendererObject< RendererScene >
ManagerTypemManager
 The owning object manager.
 
- Protected Attributes inherited from CeresEngine::RendererObject
RendererObjectID mID
 An identifier that uniquely identifies this object in the renderer.
 

Detailed Description

A class that represents a scene inside the renderer.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ ~RendererScene()

CeresEngine::RendererScene::~RendererScene ( )
final

Member Function Documentation

◆ add()

template<typename T >
void CeresEngine::RendererScene::add ( T object)
private

Adds a new object to the scene.

Usually called from the scene object constructor.

◆ create()

template<typename T >
T & CeresEngine::RendererScene::create ( )

Creates a new renderer object of the given type T.

Template Parameters
TThe renderer object type.
Returns
A reference to the newly created renderer object.

◆ enumerateGeometry()

Generator< RendererGeometry > CeresEngine::RendererScene::enumerateGeometry ( const RendererGeometryEnumerationRequest enumerationRequest = RendererGeometryEnumerationRequest()) const

◆ getCameras()

const Vector< RendererCamera * > & CeresEngine::RendererScene::getCameras ( )
inline

Enumerates the currently registered cameras.

◆ getEnvironment()

RendererEnvironment * CeresEngine::RendererScene::getEnvironment ( ) const
inlinenoexcept

A pointer to the sky environment for the scene.

◆ getEnvironments()

const Vector< RendererEnvironment * > & CeresEngine::RendererScene::getEnvironments ( )
inline

Enumerates the currently registered environments.

◆ getInfo() [1/2]

RendererSceneInfo & CeresEngine::RendererScene::getInfo ( )
inline

A structure that holds renderer-specific information for the scene.

◆ getInfo() [2/2]

const RendererSceneInfo & CeresEngine::RendererScene::getInfo ( ) const
inline

A structure that holds renderer-specific information for the scene.

◆ getLights()

const Vector< RendererLight * > & CeresEngine::RendererScene::getLights ( )
inline

Enumerates the currently registered lights.

◆ getRenderables()

const Vector< RendererRenderable * > & CeresEngine::RendererScene::getRenderables ( )
inline

Enumerates the currently registered renderables.

◆ getRenderer()

Renderer & CeresEngine::RendererScene::getRenderer ( ) const

The renderer that owns this manager instance.

◆ getTerrains()

const Vector< RendererTerrain * > & CeresEngine::RendererScene::getTerrains ( )
inline

Enumerates the currently registered terrains.

◆ getUniformBuffer()

const GPUUniformBuffer & CeresEngine::RendererScene::getUniformBuffer ( ) const
inline

The uniform buffer storing the scene GPU parameters used by the renderer.

◆ isDirty()

bool CeresEngine::RendererScene::isDirty ( ) const
inlinenoexcept

If set to true, the scene is dirty and needs to be synchronized from the entity.

◆ markAsDirty()

void CeresEngine::RendererScene::markAsDirty ( )
inlinenoexcept

If set to true, the scene is dirty and needs to be synchronized from the entity.

◆ onSkyTextureChanged()

void CeresEngine::RendererScene::onSkyTextureChanged ( )
private

◆ prepare()

void CeresEngine::RendererScene::prepare ( RendererContext context)

Prepares the scene for the rendering of the current frame.

This will update uniform buffers and perform any other necessary operations necessary for rendering.

Parameters
contextA context struct that contains parameters given by the renderer.

◆ remove()

template<typename T >
void CeresEngine::RendererScene::remove ( T object)
private

Removes an existing object from the scene.

Usually called from the scene object destructor.

Friends And Related Symbol Documentation

◆ TRendererSceneObject

Member Data Documentation

◆ mCameras

Vector<RendererCamera*> CeresEngine::RendererScene::mCameras
private

The set of registered cameras with the renderer scene.

◆ mDirty

bool CeresEngine::RendererScene::mDirty = true
private

If set to true, the scene is dirty and needs to be synchronized from the entity.

◆ mEnvironments

Vector<RendererEnvironment*> CeresEngine::RendererScene::mEnvironments
private

The set of registered terrains with the renderer scene.

◆ mInfo

RendererSceneInfo CeresEngine::RendererScene::mInfo
private

A structure that holds renderer-specific information for the scene.

◆ mLights

Vector<RendererLight*> CeresEngine::RendererScene::mLights
private

The set of registered lights with the renderer scene.

◆ mRenderables

Vector<RendererRenderable*> CeresEngine::RendererScene::mRenderables
private

The set of registered renderables with the renderer scene.

◆ mTerrains

Vector<RendererTerrain*> CeresEngine::RendererScene::mTerrains
private

The set of registered terrains with the renderer scene.

◆ mUniformBuffer

GPUDynamicUniformBuffer<RendererSceneParams> CeresEngine::RendererScene::mUniformBuffer
private

The uniform buffer storing the scene GPU parameters used by the renderer.


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