SceneToViewportMap Class
Maps scenes to their associated viewports for rendering. More...
Declaration
Public Constructors Index
| SceneToViewportMap ()=default | |
Public Member Functions Index
| bool | add (const SceneHandle sceneHandle, const ViewportHandle viewportHandle) |
|
Registers a scene-viewport association. More... | |
| SceneHandle | sceneHandle (const ViewportHandle viewportHandle) const noexcept |
|
Returns the scene associated with a viewport. More... | |
| std::span< const ViewportHandle > | viewportHandles (const SceneHandle sceneHandle) const noexcept |
|
Returns all viewports associated with a scene. More... | |
Private Member Attributes Index
| std::vector< std::vector< ViewportHandle > > | sceneToViewportHandles_ |
|
Scene-indexed list of associated viewport handles. More... | |
| std::vector< SceneHandle > | viewportToSceneHandles_ |
|
Viewport-indexed reverse lookup to the owning scene handle. More... | |
Description
Maps scenes to their associated viewports for rendering.
SceneToViewportMap maintains the relationship between Scene objects and Viewport objects. A scene can be rendered through multiple viewports (e.g., split-screen), and a viewport renders exactly one scene (1:N).
- See Also
SceneRenderingSystem
- See Also
Scene
- See Also
Viewport
Definition at line 32 of file SceneToViewportMap.ixx.
Public Constructors
SceneToViewportMap()
| explicit default |
Definition at line 46 of file SceneToViewportMap.ixx.
Public Member Functions
add()
| inline |
Registers a scene-viewport association.
Adds the viewport to the scene's viewport list. A scene can have multiple viewports, but each viewport can only be added once.
- Parameters
-
sceneHandle Handle of the scene to associate.
viewportHandle Handle of the viewport to register.
- Returns
true if the viewportHandle was successfully registered for the SceneHandle, otehrwise false
Definition at line 60 of file SceneToViewportMap.ixx.
Reference sceneHandle.
sceneHandle()
| inline nodiscard noexcept |
Returns the scene associated with a viewport.
- Parameters
-
viewportHandle Handle of the viewport to look up.
- Returns
The associated scene handle, or an invalid handle if not found.
Definition at line 94 of file SceneToViewportMap.ixx.
Referenced by add and viewportHandles.
viewportHandles()
| inline nodiscard noexcept |
Returns all viewports associated with a scene.
- Parameters
-
sceneHandle Handle of the scene to look up.
- Returns
A span of viewport handles, or an empty span if not found.
Definition at line 111 of file SceneToViewportMap.ixx.
Reference sceneHandle.
Private Member Attributes
sceneToViewportHandles_
|
Scene-indexed list of associated viewport handles.
Definition at line 37 of file SceneToViewportMap.ixx.
viewportToSceneHandles_
|
Viewport-indexed reverse lookup to the owning scene handle.
Definition at line 42 of file SceneToViewportMap.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.