StrobeControllerclass manages a strobing effect for a light node.
class StrobeController final : public Controller
StrobeController(const ColorRGB& color1, const ColorRGB& color2, const Range<float>& holdTime1, const Range<float>& holdTime2,
const Range<float>& transitionTime);
||The primary color of the strobe effect.|
||The secondary color of the strobe effect.|
||The range of times, in milliseconds, that the primary color is active.|
||The range of times, in milliseconds, that the secondary color is active.|
||The range of times, in milliseconds, that it takes to transition between the two colors.|
StrobeControllerclass is assigned to a
Lightnode to make it continuously alternate between two different colors and hold them for random intervals. The two light colors are specified by the
color2parameters. When either of these colors is set for the target light by the controller, a random time interval is chosen from the ranges specified by the
holdTime2parameters, respectively, before switching back to the other color. This creates a randomized strobing effect.
transitionTimeparameter specifies the range of times that it takes to transition from one color to the other. Each time the color is changed, a random time from this interval is chosen, and the target light's color is smoothly changed over that time interval. The
transitionTimeparameter may specify the range [0, 0], in which case the transition is always instantaneous.
A strobe controller is capable of driving a
ShaderParameterControllerattached to another node. The alpha channel of the strobe controller's output corresponds to the blend of colors currently assigned to the target light node. When the primary color is set, the alpha value is 0.0. When the secondary color is set, the alpha value is 1.0. During a transition between the primary and secondary colors, the alpha value represents the interpolation parameter between the two colors.