Utility new min/max clearing now an option in GUI

Also,  tripod Spacebrew names are unique "Active Tripod" + appId
This commit is contained in:
James Alliban
2014-01-23 12:40:04 +00:00
parent 4d81819b99
commit 41db6d58b5
21 changed files with 40 additions and 34 deletions
+3
View File
@@ -82,6 +82,9 @@ void GUI::addGraphDesignGUI()
ofxUICanvas* gui = getNewGUI(title);
gui->addToggle("Toggle Graph animation", &Graph::isAnimating, toggleDim, toggleDim);
gui->addToggle("Toggle New Min/Max clear", &Graph::isClearOnNewMinMax, toggleDim, toggleDim);
gui->addSpacer(length, 1);
gui->addToggle("Toggle Draw Body", &Graph::isDrawBody, toggleDim, toggleDim);
gui->addToggle("Toggle Draw Lines", &Graph::isDrawLines, toggleDim, toggleDim);
gui->addToggle("Toggle Clamp Y Values", &Graph::isClampYValues, toggleDim, toggleDim);
+6 -2
View File
@@ -27,6 +27,7 @@ float Graph::textY;
ofPoint Graph::textPnt;
bool Graph::isAnimating;
bool Graph::isClearOnNewMinMax;
Graph::Graph(int _graphID)
{
@@ -179,9 +180,12 @@ void Graph::addNewData(DataObject newData)
if (newData.min == -999) newData.min = 0;
if (newData.max == -999) newData.max = 0;
if (newData.min != currentMin || newData.max != currentMax)
if (isClearOnNewMinMax)
{
if (graphMesh.getVertices().size() > 0) clear();
if (newData.min != currentMin || newData.max != currentMax)
{
if (graphMesh.getVertices().size() > 0) clear();
}
}
currentValue = newData.value;
+1 -1
View File
@@ -56,6 +56,7 @@ public:
static float textY;
static ofPoint textPnt;
static bool isAnimating;
static bool isClearOnNewMinMax;
float col0[4];
@@ -69,7 +70,6 @@ public:
float currentValue;
float currentMin;
float currentMax;
float millisSinceLastPoint;
float millisGap;