class StrobeController
Defined in:
The C4Controller.h
StrobeController
class manages a strobing effect for a light node.
Definition
class StrobeController final : public Controller
Constructor
StrobeController(const ColorRGB& color1, const ColorRGB& color2, const Range<float>& holdTime1, const Range<float>& holdTime2,
const Range<float>& transitionTime);
Parameters
color1 |
The primary color of the strobe effect. |
color2 |
The secondary color of the strobe effect. |
holdTime1 |
The range of times, in milliseconds, that the primary color is active. |
holdTime2 |
The range of times, in milliseconds, that the secondary color is active. |
transitionTime |
The range of times, in milliseconds, that it takes to transition between the two colors. |
Description
The StrobeController
class is assigned to a Light
node to make it continuously alternate between two different colors and hold them for random intervals. The two light colors are specified by the color1
and color2
parameters. 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 holdTime1
and holdTime2
parameters, respectively, before switching back to the other color. This creates a randomized strobing effect.The
transitionTime
parameter 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 transitionTime
parameter may specify the range [0, 0], in which case the transition is always instantaneous.A strobe controller is capable of driving a
ShaderParameterController
attached 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.
Base Classes
Controller |
A StrobeController is a specific type of controller.
|
See Also