SPH
|
Shows direction of particle movement in color. More...
#include <Colorizer.h>
Public Member Functions | |
DirectionColorizer (const Vector &axis, const Palette &palette) | |
virtual bool | hasData (const Storage &storage) const override |
Checks if the storage constains all data necessary to initialize the colorizer. More... | |
virtual void | initialize (const Storage &storage, const RefEnum ref) override |
Initialize the colorizer before by getting necessary quantities from storage. More... | |
virtual bool | isInitialized () const override |
Checks if the colorizer has been initialized. More... | |
virtual Optional< float > | evalScalar (const Size idx) const override |
virtual Rgba | evalColor (const Size idx) const override |
Returns the color of idx-th particle. More... | |
virtual Optional< Particle > | getParticle (const Size idx) const override |
Returns the original value of the displayed quantity. More... | |
virtual Optional< Palette > | getPalette () const override |
Returns recommended palette for drawing this colorizer. More... | |
virtual void | setPalette (const Palette &newPalette) override |
Modifies the palette used by ths colorizer. More... | |
virtual std::string | name () const override |
Returns the name of the colorizer. More... | |
![]() | |
virtual Optional< float > | evalScalar (const Size UNUSED(idx)) const |
Returns the scalar representation of the colorized quantity for idx-th particle. More... | |
virtual Optional< Vector > | evalVector (const Size UNUSED(idx)) const |
Returns the vector representation of the colorized quantity for idx-th particle. More... | |
![]() | |
virtual | ~Polymorphic () |
Shows direction of particle movement in color.
Definition at line 278 of file Colorizer.h.
NAMESPACE_SPH_BEGIN DirectionColorizer::DirectionColorizer | ( | const Vector & | axis, |
const Palette & | palette | ||
) |
Definition at line 5 of file Colorizer.cpp.
Returns the color of idx-th particle.
Implements IColorizer.
Definition at line 303 of file Colorizer.h.
Definition at line 21 of file Colorizer.cpp.
Returns recommended palette for drawing this colorizer.
In case there is no palette, returns NOTHING.
Implements IColorizer.
Definition at line 312 of file Colorizer.h.
|
inlineoverridevirtual |
Returns the original value of the displayed quantity.
If no such value exists, returns NOTHING.
Implements IColorizer.
Definition at line 307 of file Colorizer.h.
|
inlineoverridevirtual |
Checks if the storage constains all data necessary to initialize the colorizer.
Implements IColorizer.
Definition at line 289 of file Colorizer.h.
|
inlineoverridevirtual |
Initialize the colorizer before by getting necessary quantities from storage.
Can only be called if hasData returns true. Must be called before evalColor is called, every time step as ArrayViews taken from storage might be invalidated.
storage | Particle storage containing source data to be drawn. |
ref | Specifies how the object refereneces the data required for evaluation; either the buffers are copied and stored in the colorizer, or only references to the the storage are kept. |
Implements IColorizer.
Definition at line 293 of file Colorizer.h.
|
inlineoverridevirtual |
Checks if the colorizer has been initialized.
Implements IColorizer.
Definition at line 297 of file Colorizer.h.
|
inlineoverridevirtual |
Returns the name of the colorizer.
This is used when showing the colorizer in the window and as filename suffix.
Implements IColorizer.
Definition at line 320 of file Colorizer.h.
|
inlineoverridevirtual |
Modifies the palette used by ths colorizer.
Implements IColorizer.
Definition at line 316 of file Colorizer.h.