SPH
Public Member Functions | List of all members
GravityColorizer Class Reference
Inheritance diagram for GravityColorizer:
TypedColorizer< Float > IColorizer Polymorphic

Public Member Functions

 GravityColorizer (const SharedPtr< IScheduler > &scheduler, const Palette &palette, const Float G, const bool addSurfaceGravity)
 
virtual void initialize (const Storage &storage, const RefEnum UNUSED(ref)) override
 
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< VectorevalVector (const Size UNUSED(idx)) const override
 Returns the vector representation of the colorized quantity for idx-th particle. More...
 
virtual std::string name () const override
 Returns the name of the colorizer. More...
 
- Public Member Functions inherited from TypedColorizer< Float >
 TypedColorizer (const QuantityId id, 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 Optional< float > evalScalar (const Size idx) const override
 
virtual Optional< VectorevalVector (const Size idx) const override
 
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...
 
- 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 ()
 

Additional Inherited Members

- Protected Attributes inherited from TypedColorizer< Float >
QuantityId id
 
Palette palette
 
ArrayRef< const Floatvalues
 

Detailed Description

Definition at line 141 of file RenderJobs.cpp.

Constructor & Destructor Documentation

◆ GravityColorizer()

GravityColorizer::GravityColorizer ( const SharedPtr< IScheduler > &  scheduler,
const Palette palette,
const Float  G,
const bool  addSurfaceGravity 
)
inline

Definition at line 150 of file RenderJobs.cpp.

Member Function Documentation

◆ evalColor()

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

Returns the color of idx-th particle.

Reimplemented from TypedColorizer< Float >.

Definition at line 189 of file RenderJobs.cpp.

◆ evalVector()

virtual Optional<Vector> GravityColorizer::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 193 of file RenderJobs.cpp.

◆ initialize()

virtual void GravityColorizer::initialize ( const Storage storage,
const RefEnum   UNUSEDref 
)
inlineoverridevirtual

Definition at line 160 of file RenderJobs.cpp.

◆ isInitialized()

virtual bool GravityColorizer::isInitialized ( ) const
inlineoverridevirtual

Checks if the colorizer has been initialized.

Reimplemented from TypedColorizer< Float >.

Definition at line 185 of file RenderJobs.cpp.

◆ name()

virtual std::string GravityColorizer::name ( ) const
inlineoverridevirtual

Returns the name of the colorizer.

This is used when showing the colorizer in the window and as filename suffix.

Reimplemented from TypedColorizer< Float >.

Definition at line 197 of file RenderJobs.cpp.


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