VCV Rack API v2
Loading...
Searching...
No Matches
rack::engine::Light Struct Reference

#include <Light.hpp>

Public Member Functions

void setBrightness (float brightness)
 Sets the brightness immediately with no light decay.
 
float getBrightness ()
 
void setBrightnessSmooth (float brightness, float deltaTime, float lambda=30.f)
 Emulates light decay with slow fall but immediate rise.
 
void setSmoothBrightness (float brightness, float deltaTime)
 DEPRECATED Alias for setBrightnessSmooth()
 
DEPRECATED void setBrightnessSmooth (float brightness, int frames=1)
 Use setBrightnessSmooth(brightness, sampleTime * frames) instead.
 

Public Attributes

float value = 0.f
 The square of the brightness.
 

Member Function Documentation

◆ setBrightness()

void rack::engine::Light::setBrightness ( float brightness)
inline

Sets the brightness immediately with no light decay.

◆ getBrightness()

float rack::engine::Light::getBrightness ( )
inline

◆ setBrightnessSmooth() [1/2]

void rack::engine::Light::setBrightnessSmooth ( float brightness,
float deltaTime,
float lambda = 30.f )
inline

Emulates light decay with slow fall but immediate rise.

Default lambda set to roughly 2 screen frames.

◆ setSmoothBrightness()

void rack::engine::Light::setSmoothBrightness ( float brightness,
float deltaTime )
inline

DEPRECATED Alias for setBrightnessSmooth()

◆ setBrightnessSmooth() [2/2]

DEPRECATED void rack::engine::Light::setBrightnessSmooth ( float brightness,
int frames = 1 )
inline

Use setBrightnessSmooth(brightness, sampleTime * frames) instead.

Member Data Documentation

◆ value

float rack::engine::Light::value = 0.f

The square of the brightness.

Unstable API. Use set/getBrightness().


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