Snapshot Class
Represents an immutable snapshot of a SceneGraph at a given point in time. More...
Declaration
Public Constructors Index
| Snapshot (const Snapshot &)=delete | |
|
Delete copy constructor. More... | |
| Snapshot (Snapshot &&) noexcept=delete | |
|
Delete move constructor. More... | |
| Snapshot (const helios::rendering::Viewport &viewport, const math::mat4f &projectionMatrix, const math::mat4f &viewMatrix, std::vector< SnapshotItem > snapshotItems) noexcept | |
|
Constructs a new immutable Snapshot from the given data. More... | |
Public Destructor Index
| ~Snapshot ()=default | |
Public Operators Index
| Snapshot & | operator= (const Snapshot &)=delete |
|
Delete copy assignment operator. More... | |
| Snapshot & | operator= (Snapshot &&) noexcept=delete |
|
Delete move assignment. More... | |
Public Member Functions Index
| std::span< const SnapshotItem > | snapshotItems () const noexcept |
|
Returns a const reference to this Snapshot's SnapshotItems. More... | |
| const helios::rendering::Viewport & | viewport () const noexcept |
| const helios::math::mat4f & | projectionMatrix () const noexcept |
|
Returns a const reference to the projection matrix for this Snapshot. More... | |
| const helios::math::mat4f & | viewMatrix () const noexcept |
|
Returns a const reference to the view matrix for this Snapshot. More... | |
Protected Member Attributes Index
| const helios::math::mat4f | projectionMatrix_ |
|
The projection matrix that should be used with this Snapshot. More... | |
| const helios::math::mat4f | viewMatrix_ |
|
The view matrix that should be used with this Snapshot. More... | |
| const std::vector< SnapshotItem > | snapshotItems_ |
|
A const collection of `SnapshotItem`s representing all renderable objects visible in this Snapshot. More... | |
| const helios::rendering::Viewport & | viewport_ |
Description
Represents an immutable snapshot of a SceneGraph at a given point in time.
The class encapsulates all necessary data to render a single frame. It is designed to be a lightweight DTO to pass information to the rendering engine abstraction layer, such as the `RenderPass` class.
A snapshot includes a camera's projection and view matrix that should be used for rendering the scene. A collection of `SnapshotItems` holds the information about the renderable objects in the scene, preferably computed by using a `FrustumCullingStrategy` (
- See Also
The class is not copyable to enforce its immutability and prevent unintended duplication of potentially large data sets.
Definition at line 35 of file Snapshot.ixx.
Public Constructors
Snapshot()
| delete |
Snapshot()
| noexcept delete |
Snapshot()
| inline noexcept |
Constructs a new immutable Snapshot from the given data.
- Parameters
-
viewport The viewport associated with this snapshot.
projectionMatrix The projection matrix of the camera for this snapshot.
viewMatrix The view matrix of the camera for this snapshot.
snapshotItems A vector of snapshot items. The vector is moved into the Snapshot, transferring ownership to this instance.
Definition at line 101 of file Snapshot.ixx.
References projectionMatrix, projectionMatrix_, Snapshot, snapshotItems, snapshotItems_, viewMatrix, viewMatrix_, viewport and viewport_.
Public Destructor
~Snapshot()
| default |
Definition at line 66 of file Snapshot.ixx.
Public Operators
operator=()
| delete |
Delete copy assignment operator.
Snapshots are not intended to be copied.
Definition at line 80 of file Snapshot.ixx.
Reference Snapshot.
operator=()
| noexcept delete |
Public Member Functions
projectionMatrix()
| inline nodiscard noexcept |
Returns a const reference to the projection matrix for this Snapshot.
The matrix represents the projection matrix of the camera that was used to capture this scene.
- Returns
A const reference to the projection matrix used for creating this Snapshot.
Definition at line 140 of file Snapshot.ixx.
Reference projectionMatrix_.
Referenced by helios::rendering::RenderPassFactory::buildRenderPass and Snapshot.
snapshotItems()
| inline nodiscard noexcept |
Returns a const reference to this Snapshot's SnapshotItems.
The vector contains all renderable items in the scene.
- Returns
A const reference to this Snapshot's collection of SnapshotItems.
Definition at line 119 of file Snapshot.ixx.
Reference snapshotItems_.
Referenced by helios::rendering::RenderPassFactory::populateRenderQueue and Snapshot.
viewMatrix()
| inline nodiscard noexcept |
Returns a const reference to the view matrix for this Snapshot.
The matrix represents the view matrix of the camera that was used to capture this scene.
- Returns
A const reference to the view matrix used for creating this Snapshot.
Definition at line 152 of file Snapshot.ixx.
Reference viewMatrix_.
Referenced by helios::rendering::RenderPassFactory::buildRenderPass and Snapshot.
viewport()
| inline nodiscard noexcept |
Returns the viewport associated with this Snapshot.
- Returns
A shared pointer to the const Viewport.
Definition at line 128 of file Snapshot.ixx.
Reference viewport_.
Referenced by helios::rendering::RenderPassFactory::buildRenderPass and Snapshot.
Protected Member Attributes
projectionMatrix_
| protected |
The projection matrix that should be used with this Snapshot.
The projection matrix transforms camera space into clip space.
Definition at line 43 of file Snapshot.ixx.
Referenced by projectionMatrix and Snapshot.
snapshotItems_
| protected |
A const collection of `SnapshotItem`s representing all renderable objects visible in this Snapshot.
Each item contains the world transformation along with the renderable object.
Definition at line 57 of file Snapshot.ixx.
Referenced by Snapshot and snapshotItems.
viewMatrix_
| protected |
The view matrix that should be used with this Snapshot.
The view matrix transforms world space coordinates into camera space.
Definition at line 50 of file Snapshot.ixx.
Referenced by Snapshot and viewMatrix.
viewport_
| protected |
The viewport associated with this Snapshot.
Definition at line 62 of file Snapshot.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.