2014-01-14 15:12:43 +00:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ofMain.h"
|
|
|
|
|
#include "DataManager.h"
|
2014-01-16 05:03:08 +00:00
|
|
|
#include "ofxFTGL.h"
|
2014-01-14 15:12:43 +00:00
|
|
|
|
|
|
|
|
class testApp;
|
|
|
|
|
|
|
|
|
|
class Graph
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Graph(int _graphID);
|
|
|
|
|
void update(ofVec3f ativeCamPos);
|
|
|
|
|
void draw();
|
2014-01-16 05:03:08 +00:00
|
|
|
void drawGraphBody();
|
|
|
|
|
void drawGraphText();
|
2014-01-14 15:12:43 +00:00
|
|
|
void addNewData(DataObject newData);
|
2014-01-16 05:03:08 +00:00
|
|
|
void setFboSettings();
|
|
|
|
|
void drawInfoToFbo();
|
2014-01-14 15:12:43 +00:00
|
|
|
void clear();
|
2014-01-16 05:03:08 +00:00
|
|
|
vector<string> explode(const string &delimiter, const string &str);
|
2014-01-14 15:12:43 +00:00
|
|
|
|
|
|
|
|
testApp *app;
|
|
|
|
|
int graphID;
|
|
|
|
|
|
|
|
|
|
int maxData; // calculated from graphWidth and graphItemXGap
|
|
|
|
|
|
2014-01-14 19:44:05 +00:00
|
|
|
ofFbo infoTextFbo;
|
2014-01-16 05:03:08 +00:00
|
|
|
ofFbo::Settings settings;
|
|
|
|
|
ofxFTGLSimpleLayout* text;
|
|
|
|
|
bool isInfoTextSet;
|
2014-01-14 19:44:05 +00:00
|
|
|
|
2014-01-14 15:12:43 +00:00
|
|
|
static float maxGraphWidth;
|
2014-01-16 05:03:08 +00:00
|
|
|
static bool isDrawBody;
|
2014-01-14 15:12:43 +00:00
|
|
|
static bool isDrawLines;
|
2014-01-16 05:03:08 +00:00
|
|
|
static bool isClampYValues;
|
2014-01-14 15:12:43 +00:00
|
|
|
static float graphItemXGap;
|
2014-01-16 05:03:08 +00:00
|
|
|
static float lineThickness;
|
2014-01-14 15:12:43 +00:00
|
|
|
static float graphHeightMax;
|
|
|
|
|
static float graphEndPercent;
|
2014-01-16 05:03:08 +00:00
|
|
|
static float zRange;
|
|
|
|
|
static float graphTextZOffset;
|
2014-01-14 15:12:43 +00:00
|
|
|
|
2014-01-16 05:03:08 +00:00
|
|
|
static float lineLength;
|
|
|
|
|
static float lineSpacing;
|
|
|
|
|
static float textSize;
|
|
|
|
|
static float fboW;
|
|
|
|
|
static float fboH;
|
|
|
|
|
static float textY;
|
|
|
|
|
static ofPoint textPnt;
|
2014-01-14 15:12:43 +00:00
|
|
|
|
|
|
|
|
float col0[4];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float distToCam;
|
|
|
|
|
ofVec3f centre;
|
2014-01-16 05:03:08 +00:00
|
|
|
|
|
|
|
|
string info;
|
|
|
|
|
|
2014-01-17 01:11:16 +00:00
|
|
|
ofMesh graphMesh;
|
2014-01-17 02:05:10 +00:00
|
|
|
float currentValue;
|
2014-01-22 14:23:10 +00:00
|
|
|
float currentMin;
|
|
|
|
|
float currentMax;
|
2014-01-14 15:12:43 +00:00
|
|
|
};
|