10#include "evan/EvanPlatform.hpp"
12#include <utility/graphic/view.hpp>
47 utility::graphic::ViewF
view;
61 void addView(
const utility::graphic::ViewF &view,
62 std::size_t swapchainIndex);
73 void setView(std::size_t index,
const utility::graphic::ViewF &view);
114 return _views[index];
125 return _views[index];
136 return _views.at(index);
148 return _views.at(index);
157 utility::graphic::ViewF
getView(std::size_t index)
const;
171 std::vector<View> _views;
Describes a set of views to render, independent of the swapchain image sets.
View & at(std::size_t index)
Accesses the view at the given index with bounds checking.
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 clear()
Removes all views from the set.
void resize(std::size_t count)
Resizes the view set to contain exactly count views.
View & operator[](std::size_t index)
Accesses the view at the given index (unchecked).
void setView(std::size_t index, const utility::graphic::ViewF &view)
Sets the view state at the given index, growing the set if necessary.
const View & operator[](std::size_t index) const
Accesses the view at the given index (unchecked, const).
utility::graphic::ViewF getView(std::size_t index) const
Retrieves the view state for the given index.
const View & at(std::size_t index) const
Accesses the view at the given index with bounds checking (const).
glm::mat4 getProjection(std::size_t index) const
Retrieves the projection matrix for the given index.
void addView(const utility::graphic::ViewF &view, std::size_t swapchainIndex)
Appends a view bound to the given swapchain.
Small result wrapper used by helpers that must return both a status and a value (e....
A single view together with the swapchain it targets.
utility::graphic::ViewF view
The view state: pose, field of view, clipping planes and viewport. Used to build the view and project...
std::size_t swapchainIndex
Index of the swapchain image set this view renders into.