Class ColorFunction
Defined in File ColorFunction.h
Inheritance Relationships
Derived Types
public flamegpu::visualiser::DiscreteColor< T >
(Template Class DiscreteColor)public flamegpu::visualiser::HSVInterpolation
(Class HSVInterpolation)public flamegpu::visualiser::StaticColor
(Class StaticColor)public flamegpu::visualiser::ViridisInterpolation
(Class ViridisInterpolation)
Class Documentation
-
class ColorFunction
Interface for generating shader code for a function that generates a color during model execution
Subclassed by flamegpu::visualiser::DiscreteColor< T >, flamegpu::visualiser::HSVInterpolation, flamegpu::visualiser::StaticColor, flamegpu::visualiser::ViridisInterpolation
Public Functions
-
virtual std::string getSrc() const = 0
Returns GLSL source code for a function with the prototype vec4 calculateColor() It may optionally also include a definition for a uniform samplerBuffer If a uniform samplerBuffer is included, it’s identifier should be returned by getSamplerName()
-
inline virtual std::string getSamplerName() const
If the shader source contains a samplerBuffer definition (e.g. of a single float/int) This should be the identifier so that the buffer can be bound to it Otherwise empty string
-
inline virtual std::string getAgentVariableName() const
If the shader source contains a samplerBuffer definition This should be the name of the agent variable so that the buffer can be bound to it Otherwise empty string
-
inline virtual std::type_index getAgentVariableRequiredType() const
If the shader source contains a samplerBuffer definition This should be the type of the agent variable so that the buffer can be bound to it Otherwise void typeid is returned.
-
virtual std::string getSrc() const = 0