SPH
Public Member Functions | List of all members
ComponentIdColorizer Class Reference

#include <Colorizer.h>

Inheritance diagram for ComponentIdColorizer:
IdColorizerTemplate< ComponentIdColorizer > IColorizer Polymorphic

Public Member Functions

 ComponentIdColorizer (const GuiSettings &gui, const Flags< Post::ComponentFlag > connectivity, const Optional< Size > highlightIdx=NOTHING)
 
void setHighlightIdx (const Optional< Size > newHighlightIdx)
 
Optional< SizegetHighlightIdx () const
 
void setConnectivity (const Flags< Post::ComponentFlag > newConnectivity)
 
Flags< Post::ComponentFlaggetConnectivity () const
 
INLINE Optional< SizeevalId (const Size idx) const
 
virtual Rgba evalColor (const Size idx) const override
 Returns the color of idx-th particle. More...
 
virtual Optional< ParticlegetParticle (const Size idx) const override
 Returns the original value of the displayed quantity. More...
 
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 std::string name () const override
 Returns the name of the colorizer. More...
 
- Public Member Functions inherited from IdColorizerTemplate< ComponentIdColorizer >
 IdColorizerTemplate (const GuiSettings &gui)
 
void setSeed (const Size newSeed)
 
virtual Optional< PalettegetPalette () const override
 Returns recommended palette for drawing this colorizer. More...
 
virtual void setPalette (const Palette &UNUSED(newPalette)) override
 
- Public Member Functions inherited from IColorizer
virtual Optional< float > evalScalar (const Size UNUSED(idx)) const
 Returns the scalar representation of the colorized quantity for idx-th particle. More...
 
virtual Optional< VectorevalVector (const Size UNUSED(idx)) const
 Returns the vector representation of the colorized quantity for idx-th particle. More...
 
virtual void setPalette (const Palette &newPalette)=0
 Modifies the palette used by ths colorizer. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Definition at line 924 of file Colorizer.h.

Constructor & Destructor Documentation

◆ ComponentIdColorizer()

ComponentIdColorizer::ComponentIdColorizer ( const GuiSettings gui,
const Flags< Post::ComponentFlag connectivity,
const Optional< Size highlightIdx = NOTHING 
)
explicit

Definition at line 230 of file Colorizer.cpp.

Member Function Documentation

◆ evalColor()

Rgba ComponentIdColorizer::evalColor ( const Size  idx) const
overridevirtual

Returns the color of idx-th particle.

Reimplemented from IdColorizerTemplate< ComponentIdColorizer >.

Definition at line 245 of file Colorizer.cpp.

◆ evalId()

INLINE Optional<Size> ComponentIdColorizer::evalId ( const Size  idx) const
inline

Definition at line 961 of file Colorizer.h.

◆ getConnectivity()

Flags<Post::ComponentFlag> ComponentIdColorizer::getConnectivity ( ) const
inline

Definition at line 957 of file Colorizer.h.

◆ getHighlightIdx()

Optional<Size> ComponentIdColorizer::getHighlightIdx ( ) const
inline

Definition at line 948 of file Colorizer.h.

◆ getParticle()

Optional< Particle > ComponentIdColorizer::getParticle ( const Size  idx) const
overridevirtual

Returns the original value of the displayed quantity.

If no such value exists, returns NOTHING.

Reimplemented from IdColorizerTemplate< ComponentIdColorizer >.

Definition at line 257 of file Colorizer.cpp.

◆ hasData()

bool ComponentIdColorizer::hasData ( const Storage storage) const
overridevirtual

Checks if the storage constains all data necessary to initialize the colorizer.

Implements IColorizer.

Definition at line 275 of file Colorizer.cpp.

◆ initialize()

void ComponentIdColorizer::initialize ( const Storage storage,
const RefEnum  ref 
)
overridevirtual

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.

Parameters
storageParticle storage containing source data to be drawn.
refSpecifies 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 279 of file Colorizer.cpp.

◆ isInitialized()

virtual bool ComponentIdColorizer::isInitialized ( ) const
inlineoverridevirtual

Checks if the colorizer has been initialized.

Implements IColorizer.

Definition at line 973 of file Colorizer.h.

◆ name()

std::string ComponentIdColorizer::name ( ) const
overridevirtual

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 295 of file Colorizer.cpp.

◆ setConnectivity()

void ComponentIdColorizer::setConnectivity ( const Flags< Post::ComponentFlag newConnectivity)
inline

Definition at line 952 of file Colorizer.h.

◆ setHighlightIdx()

void ComponentIdColorizer::setHighlightIdx ( const Optional< Size newHighlightIdx)

Definition at line 237 of file Colorizer.cpp.

Member Data Documentation

◆ r

Array<Vector> ComponentIdColorizer::r

Definition at line 938 of file Colorizer.h.


The documentation for this class was generated from the following files: