Class SceneContext
Provides read-only access to the active scene and its objects. More...
#include <Context.h>
Public Attributes
| Type | Name |
|---|---|
| UID * | active_scene = { nullptr }Root of the active scene hierarchy. |
Public Functions
| Type | Name |
|---|---|
| const ObjectID * | GetActiveCamera () const Returns the currently active camera. |
| const ObjectID * | GetActiveEnvironment () const Returns the currently active environment for IBL. |
| const std::vector< const ObjectID * > | GetObjectIDs () const Returns all renderable objects in the scene. |
| const ObjectID * | GetPPS (int _tar) const Returns the post-processing stack for a given target. |
| void | UseScene (UID * scene) Sets the active scene. |
Detailed Description
SceneContext is the primary interface for querying scene state. It returns const pointers to enforce immutability from consumers (Renderer, UI).
Note:
Thread-safety: Not thread-safe. Must be accessed from main thread only.
Public Attributes Documentation
variable active_scene
Root of the active scene hierarchy.
UID* SceneContext::active_scene;
Public Functions Documentation
function GetActiveCamera
Returns the currently active camera.
const ObjectID * SceneContext::GetActiveCamera () const
Returns:
Const pointer to active Camera, or nullptr if none active
function GetActiveEnvironment
Returns the currently active environment for IBL.
const ObjectID * SceneContext::GetActiveEnvironment () const
Returns:
Const pointer to active Environment, or nullptr if none active
function GetObjectIDs
Returns all renderable objects in the scene.
const std::vector< const ObjectID * > SceneContext::GetObjectIDs () const
Returns:
Vector of const pointers to scene objects
Note:
Used by Renderer to iterate objects for draw calls
function GetPPS
Returns the post-processing stack for a given target.
const ObjectID * SceneContext::GetPPS (
int _tar
) const
Parameters:
_tarTarget index for post-processing stack
Returns:
Const pointer to post-processing object
function UseScene
Sets the active scene.
inline void SceneContext::UseScene (
UID * scene
)
Parameters:
scenePointer to the scene root to activate
The documentation for this class was generated from the following file src/editor/Context.h