diff --git a/of/Active Tripod/bin/Active_Tripod.lib b/of/Active Tripod/bin/Active_Tripod.lib index 96b5032..aca4731 100644 Binary files a/of/Active Tripod/bin/Active_Tripod.lib and b/of/Active Tripod/bin/Active_Tripod.lib differ diff --git a/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml b/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml index 8ea72a0..44e7a76 100644 --- a/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml +++ b/of/Active Tripod/bin/data/GUI/BACKGROUNDguiPagesettings.xml @@ -1,47 +1,7 @@ - - 4 - Start red - 74.654602051 - - - 4 - Start green - 74.654602051 - - - 4 - Start blue - 78.009864807 - - - 4 - Start alpha - 255.000000000 - - - 4 - End red - 12.582237244 - - - 4 - End green - 13.421052933 - - - 4 - End blue - 13.421052933 - - - 4 - End alpha - 255.000000000 - 4 Brightness - 0.980263174 + 0.921052635 4 @@ -73,3 +33,38 @@ Alpha 1.000000000 + + 4 + Red . + 40.263156891 + + + 4 + Green . + 40.263156891 + + + 4 + Blue . + 39.424343109 + + + 4 + Alpha . + 255.000000000 + + + 4 + Radius Width + 829.532897949 + + + 4 + Radius Height + 612.536193848 + + + 4 + Circle Point Size + 52.302627563 + diff --git a/of/Active Tripod/bin/data/GUI/BAR GRAPH DESIGNguiPagesettings.xml b/of/Active Tripod/bin/data/GUI/BAR GRAPH DESIGNguiPagesettings.xml index 4c3d327..147344a 100644 --- a/of/Active Tripod/bin/data/GUI/BAR GRAPH DESIGNguiPagesettings.xml +++ b/of/Active Tripod/bin/data/GUI/BAR GRAPH DESIGNguiPagesettings.xml @@ -6,45 +6,45 @@ 4 BarWidth - 9.736842155 + 17.000000000 4 Data0 red - 190.411193848 + 196.282897949 4 Data0 green - 141.759872437 + 21.809211731 4 Data0 blue - 0.000000000 + 67.944076538 4 Data0 alpha - 255.000000000 + 158.536193848 4 Data1 red - 43.618423462 + 208.026306152 4 Data1 green - 68.782897949 + 196.282897949 4 Data1 blue - 163.569076538 + 18.453947067 4 Data1 alpha - 255.000000000 + 209.703948975 diff --git a/of/Active Tripod/src/gui/GUI.cpp b/of/Active Tripod/src/gui/GUI.cpp index 70e4393..201bb4d 100644 --- a/of/Active Tripod/src/gui/GUI.cpp +++ b/of/Active Tripod/src/gui/GUI.cpp @@ -97,19 +97,7 @@ void GUI::addBackgroundGUI() string title = "BACKGROUND"; ofxUICanvas* gui = getNewGUI(title); - gui->addLabel("GRADIENT COLOUR"); - gui->addSpacer(length, 1); - gui->addSlider("Start red", 0, 255, &app->scene.bgGradStartCol[0], length, dim); - gui->addSlider("Start green", 0, 255, &app->scene.bgGradStartCol[1], length, dim); - gui->addSlider("Start blue", 0, 255, &app->scene.bgGradStartCol[2], length, dim); - gui->addSlider("Start alpha", 0, 255, &app->scene.bgGradStartCol[3], length, dim); - gui->addSpacer(length, 1); - gui->addSlider("End red", 0, 255, &app->scene.bgGradEndCol[0], length, dim); - gui->addSlider("End green", 0, 255, &app->scene.bgGradEndCol[1], length, dim); - gui->addSlider("End blue", 0, 255, &app->scene.bgGradEndCol[2], length, dim); - gui->addSlider("End alpha", 0, 255, &app->scene.bgGradEndCol[3], length, dim); - gui->addSpacer(length, 1); - gui->addLabel("BACKGROUND IMAGE"); + gui->addLabel("VIDEO IMAGE SETTINGS"); gui->addSlider("Brightness", 0, 2, &app->scene.brightness, length, dim); gui->addSlider("Contrast", 0, 2, &app->scene.contrast, length, dim); gui->addSlider("Saturation", 0, 2, &app->scene.saturation, length, dim); @@ -117,8 +105,16 @@ void GUI::addBackgroundGUI() gui->addSlider("Green", 0, 2, &app->scene.green, length, dim); gui->addSlider("Blue", 0, 2, &app->scene.blue, length, dim); gui->addSlider("Alpha", 0, 2, &app->scene.alpha, length, dim); + gui->addSpacer(length, 1); + gui->addLabel("HUD SETTINGS"); + gui->addSlider("Red .", 0, 255, &app->scene.hudColour[0], length, dim); + gui->addSlider("Green .", 0, 255, &app->scene.hudColour[1], length, dim); + gui->addSlider("Blue .", 0, 255, &app->scene.hudColour[2], length, dim); + gui->addSlider("Alpha .", 0, 255, &app->scene.hudColour[3], length, dim); + gui->addSlider("Radius Width", 1, 2000, &app->scene.radiusW, length, dim); + gui->addSlider("Radius Height", 1, 2000, &app->scene.radiusH, length, dim); + gui->addSlider("Circle Point Size", 0, 100, &app->scene.circlePointSize, length, dim); - ofAddListener(gui->newGUIEvent, this, &GUI::variousGUIEvent); finaliseCanvas(gui, true); } diff --git a/of/Active Tripod/src/testApp.cpp b/of/Active Tripod/src/testApp.cpp index 106e5e1..0c5bc28 100644 --- a/of/Active Tripod/src/testApp.cpp +++ b/of/Active Tripod/src/testApp.cpp @@ -50,7 +50,8 @@ void testApp::update() } //-------------------------------------------------------------- -void testApp::draw(){ +void testApp::draw() +{ dataManager.draw(); scene.draw(); } @@ -69,4 +70,9 @@ void testApp::keyPressed(int key) isPaused = !isPaused; else if (key == 'f') ofToggleFullscreen(); +} + + +void testApp::windowResized(int w, int h) +{ } \ No newline at end of file diff --git a/of/Active Tripod/src/testApp.h b/of/Active Tripod/src/testApp.h index 1f5652b..0d56f58 100644 --- a/of/Active Tripod/src/testApp.h +++ b/of/Active Tripod/src/testApp.h @@ -14,6 +14,7 @@ class testApp : public ofBaseApp{ void draw(); void mousePressed(int x, int y, int button); void keyPressed(int key); + void windowResized(int w, int h); DataManager dataManager; Scene scene; diff --git a/of/Active Tripod/src/visual/Scene.cpp b/of/Active Tripod/src/visual/Scene.cpp index 5db9c3a..17d4da3 100644 --- a/of/Active Tripod/src/visual/Scene.cpp +++ b/of/Active Tripod/src/visual/Scene.cpp @@ -25,11 +25,13 @@ void Scene::update() void Scene::draw() { - ofBackgroundGradient(ofColor(bgGradStartCol[0], bgGradStartCol[1], bgGradStartCol[2], bgGradStartCol[3]), - ofColor(bgGradEndCol[0], bgGradEndCol[1], bgGradEndCol[2], bgGradEndCol[3]), - OF_GRADIENT_CIRCULAR); - + drawVideo(); + barGraph.draw(); + drawHUD(); +} +void Scene::drawVideo() +{ rgbShader.begin(); rgbShader.setUniform1f("brightness", brightness); @@ -39,13 +41,34 @@ void Scene::draw() rgbShader.setUniform1f("green", green); rgbShader.setUniform1f("blue", blue); rgbShader.setUniform1f("alpha", alpha); - - bgImg.draw(0, 0, ofGetWidth(), ofGetHeight()); - - rgbShader.end(); - - - barGraph.draw(); + bgImg.draw(0, 0, ofGetWidth(), ofGetHeight()); + + rgbShader.end(); } +void Scene::drawHUD() +{ + ofPushStyle(); + ofSetColor(hudColour[0], hudColour[1], hudColour[2], hudColour[3]); + ofBeginShape(); + + ofVertex(0, 0); + ofVertex(ofGetWidth(), 0); + ofVertex(ofGetWidth(), ofGetHeight()); + ofVertex(0, ofGetHeight()); + + ofNextContour(true); + + for (int i = 0; i < (int)circlePointSize; i++) + { + float x = (ofGetWidth() * 0.5) + cos(((float)i / (int)circlePointSize) * TWO_PI) * radiusW; + float y = (ofGetHeight() * 0.5) + sin(((float)i / (int)circlePointSize) * TWO_PI) * radiusH; + ofVertex(x, y); + } + + ofEndShape(true); + ofPopStyle(); + + ofFill(); +} \ No newline at end of file diff --git a/of/Active Tripod/src/visual/Scene.h b/of/Active Tripod/src/visual/Scene.h index 6ec29fd..1b31b52 100644 --- a/of/Active Tripod/src/visual/Scene.h +++ b/of/Active Tripod/src/visual/Scene.h @@ -19,14 +19,17 @@ public: void setup(); void update(); void draw(); + void drawVideo(); + void drawHUD(); BarGraph barGraph; ofShader rgbShader; ofImage bgImg; - + float brightness, contrast, saturation, red, green, blue, alpha; - float bgGradStartCol[4]; - float bgGradEndCol[4]; - + float hudColour[4]; + float circlePointSize; + float radiusW; + float radiusH; }; \ No newline at end of file