code for journal presentation

This commit is contained in:
toni
2018-05-15 09:32:39 +02:00
parent 97ce18f5f1
commit a536b1daec
7 changed files with 165 additions and 43 deletions

View File

@@ -167,6 +167,8 @@ public:
cpoints.setPointSize(2);
cpoints.setPointType(7);
splot.getView().setEnabled(false);
}
void addBBoxes(const BBoxes3& boxes, const K::GnuplotColor& c) {
@@ -313,6 +315,22 @@ public:
splot.getCustom() << "set label '" << txt << "' at " << pos.x << "," << pos.y << "," << pos.z << " front\n";
}
void setActivity(const int act) {
std::string activity = "Unkown";
if(act == 0){
activity = "Standing";
} else if(act == 1) {
activity = "Walking";
} else if(act == 2) {
activity = "Up";
} else if(act == 3) {
activity = "Down";
}
gp << "set label 1002 at screen 0.02, 0.94 'Act: " << activity << "'\n";
}
void addRectangle(const Point3 p1, const Point3 p2, const Color c, bool front = false, bool fill = true) {
std::vector<Point3> points = {
Point3(p1.x, p1.y, p1.z),
@@ -512,10 +530,17 @@ public:
gp.draw(splot);
stream << "set terminal x11 size 2000,1500\n";
stream << gp.getBuffer();
stream << "pause -1\n";
stream << "pause -1\n";
gp.flush();
}
void printOverview(const std::string& path) {
gp << "set terminal png size 2000,1500\n";
gp << "set output '" << path << "_overview" << ".png'\n";
gp << "set view 75,60\n";
gp << "set autoscale xy\n";
gp << "set autoscale z\n";
}
void buildFloorplan() {