11#include <Common/primitive_type.h>
19template<
typename T, std::
size_t N>
30 template<
typename U = T>
40 TFrame(uint32 wPx, uint32 hPx);
50 void setSize(uint32 wPx, uint32 hPx);
58 uint32 kernelRadiusPx)
const;
63 template<
typename PerPixelOperation>
66 template<
typename PerPixelOperation>
75 template<
typename PerPixelOperation>
78 template<
typename PerPixelOperation>
119 std::vector<T> m_pixelData;
121 std::
size_t calcPixelDataBaseIndex(uint32 x, uint32 y) const;
126#include "Frame/TFrame.ipp"
uint32 heightPx() const
Definition TFrame.ipp:440
TSpan< T > getPixelData()
Get pixel data for the full frame.
Definition TFrame.ipp:398
void forEachPixel(PerPixelOperation op)
Iterate over all pixels in the frame in row-major order.
Definition TFrame.ipp:252
TFrame()
Constructs an empty frame.
Definition TFrame.ipp:70
T ElementType
Definition TFrame.h:23
void copyPixelData(const math::TAABB2D< uint32 > ®ion, TSpan< T > out_data) const
Copy a region of pixel data into a buffer.
Definition TFrame.ipp:410
static TPixelType< U > makeMonochromaticPixel(U value)
void sample(TFrame &sampled, const math::TMathFunction2D< float64 > &kernel, uint32 kernelRadiusPx) const
Definition TFrame.ipp:120
void fill(T value)
Definition TFrame.ipp:96
void setPixel(const math::TVector2< uint32 > &coordPx, const PixelType &pixel)
Definition TFrame.ipp:370
constexpr std::size_t numPixelComponents() const noexcept
Definition TFrame.ipp:392
void flipVertically()
Definition TFrame.ipp:219
uint32 widthPx() const
Definition TFrame.ipp:434
void flipHorizontally()
Definition TFrame.ipp:199
math::TVector2< uint32 > getSizePx() const
Definition TFrame.ipp:428
TFrame & operator=(const TFrame &rhs)
Definition TFrame.ipp:463
void setSize(uint32 wPx, uint32 hPx)
Definition TFrame.ipp:237
bool isEmpty() const
Definition TFrame.ipp:446
PixelType getPixel(const math::TVector2< uint32 > &coordPx) const
Definition TFrame.ipp:343
A 2-D Axis-Aligned Bounding Box (AABB).
Definition TAABB2D.h:26
Definition TArithmeticArray.h:13
Definition TMathFunction2D.h:8
Represents a 2-D vector.
Definition TVector2.h:19
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19
std::span< T, EXTENT > TSpan
A contiguous sequence of objects of type T. Effectively the same as std::span.
Definition TSpan.h:12