Class StaticColor

Inheritance Relationships

Base Type

Class Documentation

class flamegpu::visualiser::StaticColor : public flamegpu::visualiser::ColorFunction

Creates a color function returning a static color You probably don’t need to use this class directly, instances of Color are implicitly converted to a StaticColor

Note

Currently ignores alpha channel of colors as Alpha support isn’t properly tested

Public Functions

explicit StaticColor(const Color &rgba)

Constructs a static color function generator All components must be provided in the inclusive range [0.0, 1.0]

Parameters

rgbaColor to represent

virtual std::string getSrc() const override

Returns a function returning a constant color in the form: vec4 calculateColor() { return vec4(1.0, 0.0, 0.0, 1.0); }