From 61d192ae2ade4f35ac02500c5dc613b93563d405 Mon Sep 17 00:00:00 2001 From: James Alliban Date: Fri, 24 Jan 2014 21:47:11 +0000 Subject: [PATCH] Graph/HUD Numbers now tween when changing --- of/Active Tripod/bin/Active_Tripod.lib | Bin 78700 -> 78700 bytes .../GUI/BAR GRAPH DESIGNguiPagesettings.xml | 6 +- .../data/GUI/GRAPH GLOBALguiPagesettings.xml | 4 +- ...ARATE BODY GRAPH DESIGNguiPagesettings.xml | 2 +- of/Active Tripod/src/visual/Scene.cpp | 61 +++++++++++++++--- .../src/visual/graph/AbstractGraph.cpp | 2 + .../src/visual/graph/AbstractGraph.h | 5 ++ .../src/visual/graph/BarGraph.cpp | 8 +++ .../src/visual/graph/BodyGraph.cpp | 10 +++ .../src/visual/graph/SeparateBodyGraph.cpp | 20 +++++- .../src/visual/graph/SeparateBodyGraph.h | 2 +- 11 files changed, 100 insertions(+), 20 deletions(-) diff --git a/of/Active Tripod/bin/Active_Tripod.lib b/of/Active Tripod/bin/Active_Tripod.lib index 75a61908fae537c838e068dab6dd857e403ec2e0..b550370569e25ca5ad96414f93938f89435763c4 100644 GIT binary patch delta 7034 zcmZ`-dvKK170-=J5;h@OvdQk|1qqOZggiEh;nAiFTD2-teALnzBw#z88Z9E@v`8t9 zQ-|WCG2rDCB(L{Jk13W$mUQ7H-ppNJs@Mjpl(65sN&_nv#s-MicA{8DSADJ*Xwy}EY1!yK=eH~nU1n!^E2t9q0_3{70H`X@xpUtgM{br;3O#l^=Z#lf5z8Q^Ixwla9h%vOhAU$D28Zk72- zM$hD@t|6IKZ=%e$r>-=F$JXHgvNbpIrKge5wuTrWYzU*CwuE)a(egCk8Ey^A_B7$w zx>MI)&KI=?;f}RPT)cJ)6W0Z0{b<8Fu$FZW?86)9KNDdyj*nH2rzyuDyF37%b=GfV zz|3`IfOYddrhtl^wr1*jj_>3{NZ7UhX0oJt4-&3^_FC7pQO2~6XKx_t^d4lp?70XV z61F{Oz1J?0T=;pCvnI7YAK^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ltDQ^@vq{`W%fqZocQCF`m4j17>X}h dUt0bDZ!FP5A((NqN4{Sz_&bA}hH#Cj`!A?iWn%yU 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 613d5f1..c7af8f9 100644 --- a/of/Active Tripod/bin/data/GUI/BAR GRAPH DESIGNguiPagesettings.xml +++ b/of/Active Tripod/bin/data/GUI/BAR GRAPH DESIGNguiPagesettings.xml @@ -1,12 +1,12 @@ 4 Graph Item X Gap - 9.144737244 + 8.848684311 4 BarWidth - 15.894737244 + 6.263157845 4 @@ -16,7 +16,7 @@ 4 Data send speed (seconds) - 4.485855103 + 1.671052575 4 diff --git a/of/Active Tripod/bin/data/GUI/GRAPH GLOBALguiPagesettings.xml b/of/Active Tripod/bin/data/GUI/GRAPH GLOBALguiPagesettings.xml index 9b630a1..8b92a28 100644 --- a/of/Active Tripod/bin/data/GUI/GRAPH GLOBALguiPagesettings.xml +++ b/of/Active Tripod/bin/data/GUI/GRAPH GLOBALguiPagesettings.xml @@ -27,12 +27,12 @@ 4 Decimal points 0 - 5.174342155 + 4.049342155 4 Decimal points 1 - 2.332236767 + 2.805921078 4 diff --git a/of/Active Tripod/bin/data/GUI/SEPARATE BODY GRAPH DESIGNguiPagesettings.xml b/of/Active Tripod/bin/data/GUI/SEPARATE BODY GRAPH DESIGNguiPagesettings.xml index 8fadc04..29aea3a 100644 --- a/of/Active Tripod/bin/data/GUI/SEPARATE BODY GRAPH DESIGNguiPagesettings.xml +++ b/of/Active Tripod/bin/data/GUI/SEPARATE BODY GRAPH DESIGNguiPagesettings.xml @@ -26,7 +26,7 @@ 4 Data send speed (seconds) - 0.950986862 + 1.932894707 4 diff --git a/of/Active Tripod/src/visual/Scene.cpp b/of/Active Tripod/src/visual/Scene.cpp index 6a0e7ed..5659ff4 100644 --- a/of/Active Tripod/src/visual/Scene.cpp +++ b/of/Active Tripod/src/visual/Scene.cpp @@ -89,6 +89,27 @@ void Scene::drawGraphValues() string stringVal0 = reduceDecimalCount(activeGraph->publisher0Data.back().stringValue, valDecimalPoints0); string stringVal1 = reduceDecimalCount(activeGraph->publisher1Data.back().stringValue, valDecimalPoints1); + if (activeGraph->graphName == "BODY" || activeGraph->graphName == "SEPARATE_BODY") + { + //std::stringstream sstr(activeGraph->animatedVal0LLI); + //__int64 val; + //sstr >> val; + //printf("val:%lld\n", val); + + if (activeGraph->animatedVal0LLI > 100000) + stringVal0 = reduceDecimalCount(ofToString(activeGraph->animatedVal0LLI), valDecimalPoints0); + else + stringVal0 = reduceDecimalCount(ofToString(activeGraph->animatedVal0), valDecimalPoints0); + if (activeGraph->animatedVal1LLI > 100000) + stringVal1 = reduceDecimalCount(ofToString(activeGraph->animatedVal1LLI), valDecimalPoints1); + else + stringVal1 = reduceDecimalCount(ofToString(activeGraph->animatedVal1), valDecimalPoints1); + + stringVal0 = addCommasToNumberString(stringVal0); + stringVal1 = addCommasToNumberString(stringVal1); + } + + ofPushStyle(); text.setAlignment(FTGL_ALIGN_LEFT); ofSetColor(graphTextColour[0], graphTextColour[1], graphTextColour[2], graphTextColour[3]); @@ -178,12 +199,6 @@ void Scene::drawHUDBG() void Scene::drawHUDCopy() { - text.setLineLength(lineLength); - text.setLineSpacing(lineSpacing); - text.setSize(textSize); - - drawTextBox(tlStr, "TOP LEFT"); - drawTextBox(trStr, "TOP RIGHT"); vector *p0Data = &activeGraph->publisher0Data; vector *p1Data = &activeGraph->publisher1Data; @@ -194,6 +209,35 @@ void Scene::drawHUDCopy() string stringVal0 = reduceDecimalCount(activeGraph->publisher0Data.back().stringValue, valDecimalPoints0); string stringVal1 = reduceDecimalCount(activeGraph->publisher1Data.back().stringValue, valDecimalPoints1); + + + + if (activeGraph->graphName == "BODY" || activeGraph->graphName == "SEPARATE_BODY") + { + if (activeGraph->animatedVal0LLI > 100000) + stringVal0 = reduceDecimalCount(ofToString(activeGraph->animatedVal0LLI), valDecimalPoints0); + else + stringVal0 = reduceDecimalCount(ofToString(activeGraph->animatedVal0), valDecimalPoints0); + if (activeGraph->animatedVal1LLI > 100000) + stringVal1 = reduceDecimalCount(ofToString(activeGraph->animatedVal1LLI), valDecimalPoints1); + else + stringVal1 = reduceDecimalCount(ofToString(activeGraph->animatedVal1), valDecimalPoints1); + + stringVal0 = addCommasToNumberString(stringVal0); + stringVal1 = addCommasToNumberString(stringVal1); + } + + tlStr = p0Data->back().info + "\n" + p0Data->back().unitMeasure + "\n" + stringVal0; + trStr = p0Data->back().info + "\n" + p0Data->back().unitMeasure + "\n" + stringVal1; + + text.setLineLength(lineLength); + text.setLineSpacing(lineSpacing); + text.setSize(textSize); + + drawTextBox(tlStr, "TOP LEFT"); + drawTextBox(trStr, "TOP RIGHT"); + + int amountToAverage = MIN(p0Data->size(), averageAmount); if (p0Data->size() > 2) @@ -338,9 +382,6 @@ void Scene::addNewData(vector newData) barGraph.addNewData(newData); bodyGraph.addNewData(newData); separateBodyGraph.addNewData(newData); - - tlStr = newData[0].info + "\n" + newData[0].unitMeasure + "\n" + reduceDecimalCount(ofToString(newData[0].stringValue), valDecimalPoints0); - trStr = newData[1].info + "\n" + newData[1].unitMeasure + "\n" + reduceDecimalCount(ofToString(newData[1].stringValue), valDecimalPoints1); } @@ -373,7 +414,7 @@ string Scene::addCommasToNumberString(string num) if (decimalLocation != -1) { integral = integral.substr(0 , decimalLocation); - fractional = integral.substr(decimalLocation); + fractional = num.substr(decimalLocation); } else { diff --git a/of/Active Tripod/src/visual/graph/AbstractGraph.cpp b/of/Active Tripod/src/visual/graph/AbstractGraph.cpp index 6dcbec3..a96521c 100644 --- a/of/Active Tripod/src/visual/graph/AbstractGraph.cpp +++ b/of/Active Tripod/src/visual/graph/AbstractGraph.cpp @@ -14,6 +14,8 @@ float AbstractGraph::maxGraphPercent; void AbstractGraph::setup() { millisSinceLastPoint = 0; + animatedVal0LLI = 0; + animatedVal1LLI = 0; } diff --git a/of/Active Tripod/src/visual/graph/AbstractGraph.h b/of/Active Tripod/src/visual/graph/AbstractGraph.h index 74f5550..8d52560 100644 --- a/of/Active Tripod/src/visual/graph/AbstractGraph.h +++ b/of/Active Tripod/src/visual/graph/AbstractGraph.h @@ -53,4 +53,9 @@ public: ofPoint graphTextPnt0; ofPoint graphTextPnt1; + + float animatedVal0; + float animatedVal1; + long long int animatedVal0LLI; + long long int animatedVal1LLI; }; \ No newline at end of file diff --git a/of/Active Tripod/src/visual/graph/BarGraph.cpp b/of/Active Tripod/src/visual/graph/BarGraph.cpp index dbf1ee9..cd82d31 100644 --- a/of/Active Tripod/src/visual/graph/BarGraph.cpp +++ b/of/Active Tripod/src/visual/graph/BarGraph.cpp @@ -31,6 +31,12 @@ void BarGraph::draw() float outputMin = (ofGetHeight() * 0.5) - ((ofGetHeight() * 0.5) * graphHeightMax); float outputMax = (ofGetHeight() * 0.5) + ((ofGetHeight() * 0.5) * graphHeightMax); + + + ofPushMatrix(); + //if (publisher0Data.size() >= maxData) + //ofTranslate(ofMap(normalisedTimeInc, 0, 1, 0, -graphItemXGap*0.5), 0); + for (int i = 0; i < publisher0Data.size() - 1; i++) { ofPushStyle(); @@ -73,6 +79,8 @@ void BarGraph::draw() ofPopStyle(); } + + ofPopMatrix(); } } diff --git a/of/Active Tripod/src/visual/graph/BodyGraph.cpp b/of/Active Tripod/src/visual/graph/BodyGraph.cpp index 83296ea..b0c1dc5 100644 --- a/of/Active Tripod/src/visual/graph/BodyGraph.cpp +++ b/of/Active Tripod/src/visual/graph/BodyGraph.cpp @@ -77,6 +77,16 @@ void BodyGraph::draw() endPoint1.x, endPoint1.y, 0)); + + //float mahousive = 1000000000; + //animatedVal0 = ofMap(endPoint0.y * mahousive, outputMin * mahousive, outputMax * mahousive, publisher0Data.back().min * mahousive, publisher0Data.back().max * mahousive); + //animatedVal0LLI = ofMap(endPoint0.y * mahousive, outputMin * mahousive, outputMax * mahousive, publisher0Data.back().min * mahousive, publisher0Data.back().max * mahousive); + animatedVal0 = ofMap(endPoint0.y, outputMin, outputMax, publisher0Data.back().min, publisher0Data.back().max); + animatedVal0LLI = ofMap(endPoint0.y, outputMin, outputMax, publisher0Data.back().min, publisher0Data.back().max); + + animatedVal1 = ofMap(endPoint1.y, outputMin, outputMax, publisher1Data.back().min, publisher1Data.back().max); + animatedVal1LLI = ofMap(endPoint1.y, outputMin, outputMax, publisher1Data.back().min, publisher1Data.back().max); + } body.addColor(ofColor(col0[0],col0[1],col0[2], col0[3])); body.addColor(ofColor(col1[0],col1[1],col1[2], col1[3])); diff --git a/of/Active Tripod/src/visual/graph/SeparateBodyGraph.cpp b/of/Active Tripod/src/visual/graph/SeparateBodyGraph.cpp index ac3a7bb..55fd7c4 100644 --- a/of/Active Tripod/src/visual/graph/SeparateBodyGraph.cpp +++ b/of/Active Tripod/src/visual/graph/SeparateBodyGraph.cpp @@ -31,8 +31,8 @@ void SeparateBodyGraph::draw() if (publisher0Data.size() > 1) { - ofMesh body0 = getMesh(publisher0Data, col0); - ofMesh body1 = getMesh(publisher1Data, col1); + ofMesh body0 = getMesh(publisher0Data, col0, 0); + ofMesh body1 = getMesh(publisher1Data, col1, 1); if (body0.getVertices().size() > 2) { @@ -43,6 +43,7 @@ void SeparateBodyGraph::draw() float xOffset = ofGetWidth() * AbstractGraph::minGraphPercent; float outputMin = (ofGetHeight() * 0.5) - ((ofGetHeight() * 0.5) * graphHeightMax); float outputMax = (ofGetHeight() * 0.5) + ((ofGetHeight() * 0.5) * graphHeightMax); + // draw lines ofPushStyle(); @@ -114,7 +115,7 @@ void SeparateBodyGraph::draw() } -ofMesh SeparateBodyGraph::getMesh(vector publisherData, float* col) +ofMesh SeparateBodyGraph::getMesh(vector publisherData, float* col, int graphID) { ofMesh bodyMesh; float xOffset = ofGetWidth() * AbstractGraph::minGraphPercent; @@ -142,6 +143,19 @@ ofMesh SeparateBodyGraph::getMesh(vector publisherData, float* col) float prevY0 = ofMap(publisherData[i-1].value, publisherData[i-1].min, publisherData[i-1].max, outputMin, outputMax); endPoint0.y = ofMap(normalisedTimeInc, 0, 1, prevY0, targetY0); endPoint0.x = (i-1) * graphItemXGap + xOffset + (graphItemXGap * normalisedTimeInc); + + if (graphID == 0) + { + animatedVal0 = ofMap(endPoint0.y, outputMin, outputMax, publisher0Data.back().min, publisher0Data.back().max); + animatedVal0LLI = ofMap(endPoint0.y, outputMin, outputMax, publisher0Data.back().min, publisher0Data.back().max); + //animatedVal0 = 99111222333; + //animatedVal0LLI = 99111222333; + } + else + { + animatedVal1 = ofMap(endPoint0.y, outputMin, outputMax, publisher1Data.back().min, publisher1Data.back().max); + animatedVal1LLI = ofMap(endPoint0.y, outputMin, outputMax, publisher1Data.back().min, publisher1Data.back().max); + } bodyMesh.addVertex(ofVec3f( endPoint0.x, diff --git a/of/Active Tripod/src/visual/graph/SeparateBodyGraph.h b/of/Active Tripod/src/visual/graph/SeparateBodyGraph.h index 21a3ebb..751c65e 100644 --- a/of/Active Tripod/src/visual/graph/SeparateBodyGraph.h +++ b/of/Active Tripod/src/visual/graph/SeparateBodyGraph.h @@ -13,7 +13,7 @@ public: virtual void update(); virtual void draw(); virtual void addNewData(vector newData); - ofMesh getMesh(vector publisherData, float* col); + ofMesh getMesh(vector publisherData, float* col, int graphID); testApp *app;