SPH
|
#include <RayTracer.h>
Public Member Functions | |
RayMarcher (SharedPtr< IScheduler > scheduler, const GuiSettings &settings) | |
~RayMarcher () override | |
virtual void | initialize (const Storage &storage, const IColorizer &colorizer, const ICamera &camera) override |
Prepares the objects for rendering and updates its data. More... | |
virtual bool | isInitialized () const override |
Checks if the renderer has been initialized. More... | |
![]() | |
IRaytracer (SharedPtr< IScheduler > scheduler, const GuiSettings &gui) | |
virtual void | render (const RenderParams ¶ms, Statistics &stats, IRenderOutput &output) const final |
Draws particles into the bitmap, given the data provided in initialize. More... | |
virtual void | cancelRender () override |
Stops the rendering if it is currently in progress. More... | |
![]() | |
virtual | ~Polymorphic () |
Additional Inherited Members | |
![]() | |
Rgba | getEnviroColor (const CameraRay &ray) const |
![]() | |
SharedPtr< IScheduler > | scheduler |
ThreadLocal< ThreadData > | threadData |
std::atomic_bool | shouldContinue |
Definition at line 16 of file RayTracer.h.
NAMESPACE_SPH_BEGIN RayMarcher::RayMarcher | ( | SharedPtr< IScheduler > | scheduler, |
const GuiSettings & | settings | ||
) |
Definition at line 13 of file RayTracer.cpp.
|
overridedefault |
|
overridevirtual |
Prepares the objects for rendering and updates its data.
Called every time a parameter changes. Renderer should cache any data necessary for rendering of particles (particle positions, colors, etc.).
storage | Storage containing positions of particles, must match the particles in colorizer. |
colorizer | Data-to-color conversion object for particles. Must be already initialized! |
camera | Camera used for rendering. |
Implements IRenderer.
Definition at line 26 of file RayTracer.cpp.
|
overridevirtual |
Checks if the renderer has been initialized.
Implements IRenderer.
Definition at line 126 of file RayTracer.cpp.
BRDF used to get the surface reflectance.
Definition at line 35 of file RayTracer.h.
Particle colors.
Definition at line 71 of file RayTracer.h.
Vector RayMarcher::dirToSun |
Direction to sun; sun is assumed to be a point light source.
Definition at line 32 of file RayTracer.h.
bool RayMarcher::doEmission |
If true, the colors are used for emission, otherwise for diffuse reflectance.
Definition at line 90 of file RayTracer.h.
Particle indices.
Definition at line 80 of file RayTracer.h.
Material ID for each particle.
Definition at line 83 of file RayTracer.h.
Particle positions.
Definition at line 68 of file RayTracer.h.
bool RayMarcher::renderSpheres = true |
Render surface of spheres instead of an isosurface.
Definition at line 41 of file RayTracer.h.
bool RayMarcher::shadows = true |
Cast shadows.
Definition at line 38 of file RayTracer.h.
Textures of the rendered bodies. Can be empty. The textures are assigned to the bodies using their material IDs.
Definition at line 87 of file RayTracer.h.
Mapping coordinates. May be empty.
Definition at line 74 of file RayTracer.h.
Particle volume (=mass/density)
Definition at line 77 of file RayTracer.h.