Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TFrameBuffer2D< T, N > Class Template Reference

#include <TFrameBuffer2D.h>

Inheritance diagram for ph::TFrameBuffer2D< T, N >:
ph::PixelBuffer2D

Public Member Functions

 TFrameBuffer2D (TFrame< T, N > frame)
 
pixel_buffer::TPixel< float64 > fetchPixel (math::TVector2< uint32 > xy, std::size_t mipLevel) const override
 
std::size_t estimateMemoryUsageBytes () const override
 
auto getFramePixel (math::TVector2< uint32 > xy, std::size_t mipLevel) const
 Directly get pixel value stored in the frame.
 
- Public Member Functions inherited from ph::PixelBuffer2D
 PixelBuffer2D (math::TVector2< uint32 > size, std::size_t numPixelElements)
 
 PixelBuffer2D (math::TVector2< uint32 > size, std::size_t numPixelElements, std::size_t numMipLevels)
 
virtual ~PixelBuffer2D ()=default
 
math::TVector2< uint32 > getSize () const
 
std::size_t numPixelElements () const
 
bool hasMipmap () const
 
std::size_t numMipLevels () const
 

Constructor & Destructor Documentation

◆ TFrameBuffer2D()

template<typename T , std::size_t N>
ph::TFrameBuffer2D< T, N >::TFrameBuffer2D ( TFrame< T, N > frame)
inlineexplicit

Member Function Documentation

◆ estimateMemoryUsageBytes()

template<typename T , std::size_t N>
std::size_t ph::TFrameBuffer2D< T, N >::estimateMemoryUsageBytes ( ) const
inlineoverridevirtual

Reimplemented from ph::PixelBuffer2D.

◆ fetchPixel()

template<typename T , std::size_t N>
pixel_buffer::TPixel< float64 > ph::TFrameBuffer2D< T, N >::fetchPixel ( math::TVector2< uint32 > xy,
std::size_t mipLevel ) const
inlineoverridevirtual

Implements ph::PixelBuffer2D.

◆ getFramePixel()

template<typename T , std::size_t N>
auto ph::TFrameBuffer2D< T, N >::getFramePixel ( math::TVector2< uint32 > xy,
std::size_t mipLevel ) const
inline

Directly get pixel value stored in the frame.

Returns
Pixel value of type TFrame<T, N>::Pixel. Note that LDR values (typically stored as 8-bit types) will be normalized to [0, 1], and in such case the pixel type will be TFrame<float32, N>::Pixel.

The documentation for this class was generated from the following file: