|
evan 2026.1.4
Evan
|
Describes a set of views to render, independent of the swapchain image sets. More...
#include <headers/evan/ViewSet.hpp>
Classes | |
| struct | View |
| A single view together with the swapchain it targets. More... | |
Public Member Functions | |
| void | addView (const utility::graphic::ViewF &view, std::size_t swapchainIndex) |
| Appends a view bound to the given swapchain. | |
| void | setView (std::size_t index, const utility::graphic::ViewF &view) |
| Sets the view state at the given index, growing the set if necessary. | |
| void | setSwapchainIndex (std::size_t index, std::size_t swapchainIndex) |
| Sets the swapchain index of the view at the given index, growing the set if necessary. | |
| void | resize (std::size_t count) |
Resizes the view set to contain exactly count views. | |
| void | clear () |
| Removes all views from the set. | |
| std::size_t | size () const |
| bool | empty () const |
| View & | operator[] (std::size_t index) |
| Accesses the view at the given index (unchecked). | |
| const View & | operator[] (std::size_t index) const |
| Accesses the view at the given index (unchecked, const). | |
| View & | at (std::size_t index) |
| Accesses the view at the given index with bounds checking. | |
| const View & | at (std::size_t index) const |
| Accesses the view at the given index with bounds checking (const). | |
| utility::graphic::ViewF | getView (std::size_t index) const |
| Retrieves the view state for the given index. | |
| glm::mat4 | getProjection (std::size_t index) const |
| Retrieves the projection matrix for the given index. | |
Describes a set of views to render, independent of the swapchain image sets.
A ViewSet is an ordered list of views (camera poses + projections). Each view is associated with the index of the swapchain image set it renders into. This decouples the concept of "how many views must be rendered" from "how many swapchains / images exist":
The Renderer iterates over a ViewSet to know which view matrices to upload (one uniform buffer update per view) and which swapchain image to render each view into.
Definition at line 36 of file ViewSet.hpp.
Appends a view bound to the given swapchain.
| view | The view state to append. |
| swapchainIndex | Index of the swapchain image set to target. |
|
inline |
Accesses the view at the given index with bounds checking.
| index | Index of the view to access. |
Definition at line 134 of file ViewSet.hpp.
Accesses the view at the given index with bounds checking (const).
| index | Index of the view to access. |
Definition at line 146 of file ViewSet.hpp.
| bool evan::ViewSet::empty | ( | ) | const |
| glm::mat4 evan::ViewSet::getProjection | ( | std::size_t | index | ) | const |
Retrieves the projection matrix for the given index.
| index | Index of the view. |
| utility::graphic::ViewF evan::ViewSet::getView | ( | std::size_t | index | ) | const |
Retrieves the view state for the given index.
| index | Index of the view. |
|
inline |
Accesses the view at the given index (unchecked).
| index | Index of the view to access. |
Definition at line 112 of file ViewSet.hpp.
Accesses the view at the given index (unchecked, const).
| index | Index of the view to access. |
Definition at line 123 of file ViewSet.hpp.
| void evan::ViewSet::resize | ( | std::size_t | count | ) |
Resizes the view set to contain exactly count views.
| count | The new number of views. |

| void evan::ViewSet::setSwapchainIndex | ( | std::size_t | index, |
| std::size_t | swapchainIndex | ||
| ) |
Sets the swapchain index of the view at the given index, growing the set if necessary.
| index | Index of the view to update. |
| swapchainIndex | Index of the swapchain image set to target. |
Sets the view state at the given index, growing the set if necessary.
The existing swapchain index is preserved when the view already exists; new entries default to swapchain index 0.
| index | Index of the view to set. |
| view | The view state to store. |
| std::size_t evan::ViewSet::size | ( | ) | const |
