23 const Rgba& lineColor,
53 mutable std::atomic_bool shouldContinue;
55 mutable Timer lastRenderTimer;
62 const ICamera& camera)
override;
Wrapper of wxBitmap, will be possibly replaced by custom implementation.
#define NAMESPACE_SPH_END
void drawPalette(IRenderContext &context, const Pixel origin, const Pixel size, const Rgba &lineColor, const Palette &palette)
Measuring time intervals and executing periodic events.
Generic dynamically allocated resizable storage.
Interface defining a camera or view, used by a renderer.
Interface for objects assigning colors to particles.
Abstraction of a device used for rendering.
virtual Pixel size() const =0
Returns the size of the canvas associated with the context.
Interface used to implement renderers.
Represents a color palette, used for mapping arbitrary number to a color.
Array< Rgba > colors
Colors of particles assigned by the colorizer.
ParticleRenderer(const GuiSettings &settings)
Array< Vector > positions
Positions of particles.
Vector cameraDir
Camera direction for which the cached values have been sorted.
Optional< Palette > palette
Color palette or NOTHING if no palette is drawn.
virtual bool isInitialized() const override
Checks if the renderer has been initialized.
virtual void initialize(const Storage &storage, const IColorizer &colorizer, const ICamera &camera) override
Prepares the objects for rendering and updates its data.
virtual void render(const RenderParams ¶ms, Statistics &stats, IRenderOutput &output) const override
Draws particles into the bitmap, given the data provided in initialize.
Array< Vector > vectors
Vectors representing the colorized quantity. May be empty.
virtual void cancelRender() override
Stops the rendering if it is currently in progress.
Array< Size > idxs
Indices (in parent storage) of particles.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
Basic time-measuring tool. Starts automatically when constructed.
Parameters of the rendered image.