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

#include <Colorizer.h>

Inheritance diagram for StressColorizer:
IColorizer Polymorphic

Public Member Functions

 StressColorizer (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 Rgba evalColor (const Size idx) const override
 Returns the color of idx-th particle. More...
 
virtual Optional< float > evalScalar (const Size idx) const override
 
virtual Optional< VectorevalVector (const Size UNUSED(idx)) const override
 Returns the vector representation of the colorized quantity for idx-th particle. More...
 
virtual Optional< ParticlegetParticle (const Size idx) const override
 Returns the original value of the displayed quantity. More...
 
virtual Optional< PalettegetPalette () 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...
 
- 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...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Definition at line 487 of file Colorizer.h.

Constructor & Destructor Documentation

◆ StressColorizer()

StressColorizer::StressColorizer ( Palette  palette)
inlineexplicit

Definition at line 493 of file Colorizer.h.

Member Function Documentation

◆ evalColor()

virtual Rgba StressColorizer::evalColor ( const Size  idx) const
inlineoverridevirtual

Returns the color of idx-th particle.

Implements IColorizer.

Definition at line 509 of file Colorizer.h.

◆ evalScalar()

virtual Optional<float> StressColorizer::evalScalar ( const Size  idx) const
inlineoverridevirtual

Definition at line 513 of file Colorizer.h.

◆ evalVector()

virtual Optional<Vector> StressColorizer::evalVector ( const Size   UNUSEDidx) const
inlineoverridevirtual

Returns the vector representation of the colorized quantity for idx-th particle.

If there is no reasonable vector representation (which is true for any non-vector quantity) or the function is not defined, return NOTHING.

Reimplemented from IColorizer.

Definition at line 521 of file Colorizer.h.

◆ getPalette()

virtual Optional<Palette> StressColorizer::getPalette ( ) const
inlineoverridevirtual

Returns recommended palette for drawing this colorizer.

In case there is no palette, returns NOTHING.

Implements IColorizer.

Definition at line 530 of file Colorizer.h.

◆ getParticle()

virtual Optional<Particle> StressColorizer::getParticle ( const Size  idx) const
inlineoverridevirtual

Returns the original value of the displayed quantity.

If no such value exists, returns NOTHING.

Implements IColorizer.

Definition at line 525 of file Colorizer.h.

◆ hasData()

virtual bool StressColorizer::hasData ( const Storage storage) const
inlineoverridevirtual

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

Implements IColorizer.

Definition at line 496 of file Colorizer.h.

◆ initialize()

virtual void StressColorizer::initialize ( const Storage storage,
const RefEnum  ref 
)
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.

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 500 of file Colorizer.h.

◆ isInitialized()

virtual bool StressColorizer::isInitialized ( ) const
inlineoverridevirtual

Checks if the colorizer has been initialized.

Implements IColorizer.

Definition at line 505 of file Colorizer.h.

◆ name()

virtual std::string StressColorizer::name ( ) const
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 538 of file Colorizer.h.

◆ setPalette()

virtual void StressColorizer::setPalette ( const Palette newPalette)
inlineoverridevirtual

Modifies the palette used by ths colorizer.

Implements IColorizer.

Definition at line 534 of file Colorizer.h.


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