Object that can store value of any type.
Wrapper over enum allowing setting (and querying) individual bits of the stored value.
uint32_t Size
Integral type used to index arrays (by default).
#define NAMESPACE_SPH_END
const NothingType NOTHING
Template for thread-local storage.
Type-safe object that can store value of any type, similar to std::any.
Generic dynamically allocated resizable storage.
Interface defining a camera or view, used by a renderer.
Interface for objects assigning colors to particles.
Base class for renderers based on raytracing.
virtual void render(const RenderParams ¶ms, Statistics &stats, IRenderOutput &output) const final
Draws particles into the bitmap, given the data provided in initialize.
virtual Rgba shade(const RenderParams ¶ms, const CameraRay &ray, ThreadData &data) const =0
Rgba getEnviroColor(const CameraRay &ray) const
virtual void cancelRender() override
Stops the rendering if it is currently in progress.
ThreadLocal< ThreadData > threadData
SharedPtr< IScheduler > scheduler
Texture hdri
HDRI for the background. Can be empty.
IRaytracer(SharedPtr< IScheduler > scheduler, const GuiSettings &gui)
AutoPtr< IColorMap > colorMap
Color mapping operator.
struct IRaytracer::@38::@39 enviro
Size subsampling
Number of subsampled iterations.
std::atomic_bool shouldContinue
Size iterationLimit
Number of iterations of the progressive renderer.
virtual void update(const Bitmap< Rgba > &bitmap, Array< Label > &&labels, const bool isFinal)=0
May be called once after render finishes or multiple times for progressive renderers.
virtual void update(Bitmap< Rgba > &&bitmap, Array< Label > &&labels, const bool isFinal)=0
May be called once after render finishes or multiple times for progressive renderers.
Interface used to implement renderers.
virtual void initialize(const Storage &storage, const IColorizer &colorizer, const ICamera &camera)=0
Prepares the objects for rendering and updates its data.
virtual void render(const RenderParams ¶ms, Statistics &stats, IRenderOutput &output) const =0
Draws particles into the bitmap, given the data provided in initialize.
virtual void cancelRender()=0
Stops the rendering if it is currently in progress.
virtual bool isInitialized() const =0
Checks if the renderer has been initialized.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
Simple 2D vector with integer coordinates. Provides conversion from and to wxPoint.
Ray given by origin and target point.
UniformRng rng
Random-number generator for this thread.
Any data
Additional data used by the implementation.
Base class for all polymorphic objects.
Parameters of the rendered image.
Optional< Size > selected
Highlighted particle (only for interactive view).
float sunLight
Intensity of the sunlight.
bool showLabels
Show numerical values of iso-lines.
struct RenderParams::@36 volume
Parameters of volumetric renderer.
Rgba background
Background color of the rendered image.
struct RenderParams::@33 particles
Parameters of the particle renderer.
float length
Length of the drawn vectors in pixels;.
AutoPtr< ICamera > camera
Camera used for rendering.
float level
Value of the iso-surface defining the rendered surface.
bool showKey
If true, a color palette and a distance scale is included in the image.
float isoStep
Step between subsequent iso-lines.
struct RenderParams::@35 surface
Parameters of rendered surface.
Size gridSize
Horizontal resolution of the grid.
struct RenderParams::@37 contours
AutoPtr< ITracker > tracker
Tracker used for camera motion.
float absorption
Absorption coefficient [m^-1].
bool doAntialiasing
If true, the particles will be drawn with antialiasing.
void initialize(const GuiSettings &gui)
Sets up parameters using values stored in settings.
float emission
Emission multiplier.
bool renderGhosts
If true, ghost particles (if present) will be rendered as empty circles.
struct RenderParams::@34 vectors
Parameters of rendered vectors.
float ambientLight
Intensity of the ambient light, illuminating every point unconditionally.
float compressionFactor
Compression factor of the logarithmic tonemapper.
float filterWidth
Width of the image reconstruction filter.
bool grayScale
If true, the palette is converted to grayscale.
bool smoothed
If true, particles will be smoothed using cubic spline.
float scale
Scaling factor of drawn particles relative to 1.