MCPcopy Create free account
hub / github.com/braitsch/ofxDatGui / update

Method update

example-TimeGraph/src/ofApp.cpp:89–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89void ofApp::update()
90{
91// generate a couple sine waves between 0 & 1 //
92 float v1 = (1+sin(ang1+=.02f))/2;
93 float v2 = (1+sin(ang2+=gui->getSlider("multiplier")->getValue()))/2;
94
95// oscillate the amplitude of the wave monitor //
96 s2->setValue(v1);
97 m1->setAmplitude(v1);
98
99// and the values we supply to the plotter //
100 p1->setValue(v2 * p1->getRange());
101 p1->setSpeed(gui->getSlider("sweep speed")->getValue());
102 p2->setValue(v2 * p1->getRange());
103 p2->setSpeed(gui->getSlider("sweep speed")->getValue());
104}
105
106void ofApp::draw()
107{

Callers

nothing calls this directly

Calls 6

getValueMethod · 0.80
getSliderMethod · 0.80
setAmplitudeMethod · 0.80
getRangeMethod · 0.80
setSpeedMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected