EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
EBGeometry::Render::PixelQuery< T, S > Struct Template Reference

One pixel of a rendered image: the functor that Renderer runs once per pixel index, on the host or through GPU::parallelFor(). More...

#include <EBGeometry_Render.hpp>

Public Member Functions

 PixelQuery (const S &a_shape, const Camera< T > &a_camera, const Settings< T > &a_settings) noexcept
 The pixel functor for a shape, a camera and settings.
 
PixelResult operator() (const uint32_t &a_index) const noexcept
 Shade pixel a_index (row a_index / width, column a_index % width).
 

Public Attributes

S m_shape
 The shape.
 
Camera< T > m_camera
 The camera.
 
Settings< T > m_settings
 The settings.
 
RenderDetail::CameraView< T > m_view
 The camera's eye and axes, worked out once rather than per pixel.
 

Detailed Description

template<class T, class S>
struct EBGeometry::Render::PixelQuery< T, S >

One pixel of a rendered image: the functor that Renderer runs once per pixel index, on the host or through GPU::parallelFor().

Trivially copyable when the shape is. Everything it needs about the shape (its box, its scale, the floor's height) it reads from the shape itself, so it can run where only a device view of the shape is valid.

Template Parameters
TFloating-point precision.
SShape type.

Constructor & Destructor Documentation

◆ PixelQuery()

template<class T , class S >
EBGeometry::Render::PixelQuery< T, S >::PixelQuery ( const S &  a_shape,
const Camera< T > &  a_camera,
const Settings< T > &  a_settings 
)
inlinenoexcept

The pixel functor for a shape, a camera and settings.

Parameters
[in]a_shapeThe shape (a device view of it, for a device render).
[in]a_cameraThe camera.
[in]a_settingsThe settings.

Member Function Documentation

◆ operator()()

template<class T , class S >
PixelResult EBGeometry::Render::PixelQuery< T, S >::operator() ( const uint32_t &  a_index) const
inlinenoexcept

Shade pixel a_index (row a_index / width, column a_index % width).

Parameters
[in]a_indexPixel index.
Returns
The pixel.

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