diff options
| author | Tim Redfern <tim@getdrop.com> | 2022-11-21 19:08:25 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2022-11-21 19:08:25 +0000 |
| commit | 86c0c939fd74c80d00506c030b47b6aa1eb4cf71 (patch) | |
| tree | 17903887d9265f406728025aff444611eaa69e52 /audioin | |
| parent | 4ceddea7412d683d8b828ad1027529d7167520d4 (diff) | |
laser gui
Diffstat (limited to 'audioin')
| -rw-r--r-- | audioin/addons.make | 1 | ||||
| -rw-r--r-- | audioin/src/ofApp.cpp | 16 | ||||
| -rw-r--r-- | audioin/src/ofApp.h | 11 |
3 files changed, 26 insertions, 2 deletions
diff --git a/audioin/addons.make b/audioin/addons.make index f179d33..bffb1d7 100644 --- a/audioin/addons.make +++ b/audioin/addons.make @@ -1 +1,2 @@ +ofxGui ofxHelios
\ No newline at end of file diff --git a/audioin/src/ofApp.cpp b/audioin/src/ofApp.cpp index e6b0e6d..16134ce 100644 --- a/audioin/src/ofApp.cpp +++ b/audioin/src/ofApp.cpp @@ -21,11 +21,23 @@ void ofApp::setup(){ hScale=8.0f; lineWidth=2.0f; + + lasergui.setup("laser","",5,5); + lasergui.add(laser_power.set("power", false)); + lasergui.add(laser_intensity.set("intensity", 30, 0, 255)); + lasergui.add(laser_points.set("points", 30000, 0, 40000)); + lasergui.add(laser_subdivide.set("subdivide", 15, 1, 100)); + lasergui.add(laser_blank_num.set("blank points", 8, 0, 32)); + lasergui.add(laser_max_angle.set("max angle", 15.0f, 1.0f, 90.0f)); } void ofApp::update(){ - + laser.set_pts(laser_points); + laser.set_subdivide(laser_subdivide); + laser.set_blanknum(laser_blank_num); + laser.set_maxangle(laser_max_angle); + laser.set_intensity(laser_intensity); } int sampleNum=0; @@ -55,7 +67,7 @@ void ofApp::draw(){ line.draw(); - laser.draw(line); + //laser.draw(line); ofPopMatrix(); diff --git a/audioin/src/ofApp.h b/audioin/src/ofApp.h index c0bba64..5f5e78c 100644 --- a/audioin/src/ofApp.h +++ b/audioin/src/ofApp.h @@ -1,6 +1,7 @@ #pragma once #include "ofMain.h" +#include "ofxGui.h" #include "ofxHelios.h" //#include <baudvine/ringbuf.h> @@ -100,4 +101,14 @@ class ofApp : public ofBaseApp{ float lineWidth; ofxHelios laser; + + //======= laser gui + + ofxPanel lasergui; + ofParameter<bool> laser_power; + ofParameter<int> laser_intensity; + ofParameter<int> laser_points; + ofParameter<int> laser_subdivide; + ofParameter<int> laser_blank_num; + ofParameter<float> laser_max_angle; }; |
