Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::pixel_buffer::TPixel< T > Class Template Referencefinal

Represent a pixel from pixel buffer. More...

#include <PixelBuffer2D.h>

Public Member Functions

 TPixel ()
 
template<std::size_t N>
 TPixel (const std::array< T, N > &values)
 Make a pixel from an array of values. Number of pixel values is inferred by the array dimension.
 
template<std::size_t N>
 TPixel (const std::array< T, N > &valueBuffer, std::size_t numUsedValues)
 Make a pixel from values in a buffer.
 
template<typename U >
 TPixel (const TPixel< U > &other)
 
template<std::size_t N>
std::array< T, N > getValues () const
 
std::array< T, MAX_PIXEL_ELEMENTSgetAllValues () const
 
std::size_t numValues () const
 
operator[] (std::size_t index) const
 

Detailed Description

template<typename T>
class ph::pixel_buffer::TPixel< T >

Represent a pixel from pixel buffer.

Constructor & Destructor Documentation

◆ TPixel() [1/4]

template<typename T >
ph::pixel_buffer::TPixel< T >::TPixel ( )
inline

◆ TPixel() [2/4]

template<typename T >
template<std::size_t N>
ph::pixel_buffer::TPixel< T >::TPixel ( const std::array< T, N > & values)
inline

Make a pixel from an array of values. Number of pixel values is inferred by the array dimension.

◆ TPixel() [3/4]

template<typename T >
template<std::size_t N>
ph::pixel_buffer::TPixel< T >::TPixel ( const std::array< T, N > & valueBuffer,
std::size_t numUsedValues )
inline

Make a pixel from values in a buffer.

Parameters
numUsedValuesNumber of pixel values to extract from valueBuffer.

◆ TPixel() [4/4]

template<typename T >
template<typename U >
ph::pixel_buffer::TPixel< T >::TPixel ( const TPixel< U > & other)
inlineexplicit

Member Function Documentation

◆ getAllValues()

template<typename T >
std::array< T, MAX_PIXEL_ELEMENTS > ph::pixel_buffer::TPixel< T >::getAllValues ( ) const
inline

Values other than the stored values (i.e., index >= numValues) will be 0.

◆ getValues()

template<typename T >
template<std::size_t N>
std::array< T, N > ph::pixel_buffer::TPixel< T >::getValues ( ) const
inline

◆ numValues()

template<typename T >
std::size_t ph::pixel_buffer::TPixel< T >::numValues ( ) const
inline

◆ operator[]()

template<typename T >
T ph::pixel_buffer::TPixel< T >::operator[] ( std::size_t index) const
inline

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