class Scene

Scene representation for the graphics framework.

File location: framework/cauldron/framework/inc/core/scene.h

Construction

Return type

Description

Constructor with default behavior.

Methods

Return type

Description

void

SetCurrentCamera (const Entity * pCameraEntity)
Sets the currently active camera for the scene.

const CameraComponent *

Gets the currently set active camera for the scene.

CameraComponent *

GetCurrentCamera ()

void

SetBRDFLutTexture (const Texture * pTexture)
Sets the BRDF lookup texture for the scene.

const Texture *

Gets the BRDF lookup texture for the scene.

void

SetIBLTexture (const Texture * pTexture, IBLTexture textureType)
Sets the scene’s image-based lighting (IBL) texture.

const Texture *

GetIBLTexture (IBLTexture textureType) const
Gets the scene’s image-based lighting (IBL) texture.

void

SetMipLODBias (float mipLODBias)
Sets the global mip LOD bias to use when rendering geometry.

void

AddContentBlockEntities (const ContentBlock * pContentBlock)
Adds all entities in a loaded “ContentBlock“ to the scene. Also sets a new active camera if one was provided and updates the scene bounding box to encapsulate all newly loaded entities.

void

Removes all entities in a loaded “ContentBlock“ from the scene. Also resets camera to default if current active camera is being unloaded and recomputes the scene bounding box.

void

Initializes the scene and triggers the creation of default scene content (camera, lighting).

void

Schedules the loading of all default scene content (via “TaskManager“).

void

UpdateScene (double deltaTime)
Updates the scene for the frame. Updates lighting constants and transforms.

void

Shuts down the scene when the graphics framework shuts down.

bool

IsReady () const
Returns whether the scene is fully initialized and ready for processing or not.

const SceneInformation &

GetSceneInfo () const
Gets the “SceneInformation“ for the current frame.

const SceneLightingInformation &

Gets the “SceneLightingInformation“ for the current frame.

const std::vector<const Entity *>&

Gets the list of scene entities for traversal.

const BoundingBox &

Gets the scene’s “BoundingBox“.

ASManager *

Gets the “ASManager“ for the scene.

void

Sets the scene’s “ScreenSpaceShadowTexture“.

const Texture *

Gets the scene’s “ScreenSpaceShadowTexture“.

void

SetSceneExposure (float value)
Set the scene’s exposure value.

void

SetIBLFactor (float value)
Set the scene’s IBL factor.

void

SetSpecularIBLFactor (float value)
Set the scene’s specular IBL factor.

float

Get the scene’s exposure value.

float

Get the scene’s IBL factor.

float

Get the scene’s specular IBL factor.

bool

Queries if the scene’s bounding box was updated in AddContentBlockEntities (is reset by UpdateScene each frame).

int32_t&

Get the Skydome’s procedurally generated light’s time of day.

int32_t&

Get the Skydome’s procedurally generated light’s time of day.

Detailed description

Scene representation for the graphics framework. All loaded entities (whether active or not) are part of the scene and can be queried/interacted with.

Construction

Scene

Copied!

Scene ()

Constructor with default behavior.


Methods

SetCurrentCamera

Copied!

void SetCurrentCamera (const Entity * pCameraEntity)

Sets the currently active camera for the scene.


GetCurrentCamera

Copied!

const CameraComponent * GetCurrentCamera () const

Gets the currently set active camera for the scene.


SetBRDFLutTexture

Copied!

void SetBRDFLutTexture (const Texture * pTexture)

Sets the BRDF lookup texture for the scene.


GetBRDFLutTexture

Copied!

const Texture * GetBRDFLutTexture () const

Gets the BRDF lookup texture for the scene.


SetIBLTexture

Copied!

void SetIBLTexture (const Texture * pTexture, IBLTexture  textureType)

Sets the scene’s image-based lighting (IBL) texture.


GetIBLTexture

Copied!

const Texture * GetIBLTexture (IBLTexture  textureType) const

Gets the scene’s image-based lighting (IBL) texture.


SetMipLODBias

Copied!

void SetMipLODBias (float mipLODBias)

Sets the global mip LOD bias to use when rendering geometry.


AddContentBlockEntities

Copied!

void AddContentBlockEntities (const ContentBlock * pContentBlock)

Adds all entities in a loaded ContentBlock to the scene. Also sets a new active camera if one was provided and updates the scene bounding box to encapsulate all newly loaded entities.


RemoveContentBlockEntities

Copied!

void RemoveContentBlockEntities (const ContentBlock * pContentBlock)

Removes all entities in a loaded ContentBlock from the scene. Also resets camera to default if current active camera is being unloaded and recomputes the scene bounding box.


InitScene

Copied!

void InitScene ()

Initializes the scene and triggers the creation of default scene content (camera, lighting).


InitSceneContent

Copied!

void InitSceneContent ()

Schedules the loading of all default scene content (via TaskManager).


UpdateScene

Copied!

void UpdateScene (double deltaTime)

Updates the scene for the frame. Updates lighting constants and transforms.


TerminateScene

Copied!

void TerminateScene ()

Shuts down the scene when the graphics framework shuts down.


IsReady

Copied!

bool IsReady () const

Returns whether the scene is fully initialized and ready for processing or not.


GetSceneInfo

Copied!

const SceneInformation & GetSceneInfo () const

Gets the SceneInformation for the current frame.


GetSceneLightInfo

Copied!

const SceneLightingInformation & GetSceneLightInfo () const

Gets the SceneLightingInformation for the current frame.


GetSceneEntities

Copied!

const std::vector<const Entity *>& GetSceneEntities () const

Gets the list of scene entities for traversal.


GetBoundingBox

Copied!

const BoundingBox & GetBoundingBox () const

Gets the scene’s BoundingBox.


GetASManager

Copied!

ASManager * GetASManager ()

Gets the ASManager for the scene.


SetScreenSpaceShadowTexture

Copied!

void SetScreenSpaceShadowTexture (const Texture * pTexture)

Sets the scene’s ScreenSpaceShadowTexture.


GetScreenSpaceShadowTexture

Copied!

const Texture * GetScreenSpaceShadowTexture () const

Gets the scene’s ScreenSpaceShadowTexture.


SetSceneExposure

Copied!

void SetSceneExposure (float value)

Set the scene’s exposure value.


SetIBLFactor

Copied!

void SetIBLFactor (float value)

Set the scene’s IBL factor.


SetSpecularIBLFactor

Copied!

void SetSpecularIBLFactor (float value)

Set the scene’s specular IBL factor.


GetSceneExposure

Copied!

float GetSceneExposure ()

Get the scene’s exposure value.


GetIBLFactor

Copied!

float GetIBLFactor ()

Get the scene’s IBL factor.


GetSpecularIBLFactor

Copied!

float GetSpecularIBLFactor ()

Get the scene’s specular IBL factor.


IsBoundingBoxUpdated

Copied!

bool IsBoundingBoxUpdated ()

Queries if the scene’s bounding box was updated in AddContentBlockEntities (is reset by UpdateScene each frame).


GetSkydomeHour

Copied!

int32_t& GetSkydomeHour ()

Get the Skydome’s procedurally generated light’s time of day.


GetSkydomeMinute

Copied!

int32_t& GetSkydomeMinute ()

Get the Skydome’s procedurally generated light’s time of day.