added tex template
This commit is contained in:
22
code/Vis.h
22
code/Vis.h
@@ -2,6 +2,7 @@
|
||||
#define VIS_H
|
||||
|
||||
#include <KLib/misc/gnuplot/Gnuplot.h>
|
||||
#include <KLib/misc/gnuplot/GnuplotSize.h>
|
||||
#include <KLib/misc/gnuplot/GnuplotSplot.h>
|
||||
#include <KLib/misc/gnuplot/GnuplotSplotElementLines.h>
|
||||
#include <KLib/misc/gnuplot/GnuplotSplotElementPoints.h>
|
||||
@@ -31,6 +32,7 @@ public:
|
||||
K::GnuplotSplotElementLines smoothPath;
|
||||
K::GnuplotSplotElementLines groundTruth;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Vis() {
|
||||
@@ -141,6 +143,14 @@ public:
|
||||
gp << "set label 1 \"" << ((ts-firstTs)/1000.0f) << "\" at screen 0.02,0.98\n";
|
||||
}
|
||||
|
||||
void setFilteringMedian(double median){
|
||||
gp << "set label 2 \"" << median << "\" at screen 0.02,0.90\n";
|
||||
}
|
||||
|
||||
void setSmoothingMedian(double median){
|
||||
gp << "set label 3 \"" << median << "\" at screen 0.02,0.85\n";
|
||||
}
|
||||
|
||||
void removeGrid() {
|
||||
gridNodes.clear();;
|
||||
}
|
||||
@@ -150,20 +160,26 @@ public:
|
||||
particleDir.clear();
|
||||
}
|
||||
|
||||
void addObject(const int idx, const Point3& p) {
|
||||
void addObject(const int idx, const Point3& p, const std::string& hex) {
|
||||
gp << "set object " << idx << " polygon ";
|
||||
gp << "from " << p.x << "," << p.y << "," << p.z;
|
||||
gp << " to " << p.x << "," << p.y << "," << p.z + 200;
|
||||
gp << " to " << p.x << "," << p.y << "," << p.z; // close
|
||||
gp << " lw 2 ";
|
||||
gp << "fc rgb '" + hex + "'";
|
||||
gp << "\n";
|
||||
}
|
||||
|
||||
void setEstAndShould(const Point3& est, const Point3& should) {
|
||||
addObject(2,est);
|
||||
addObject(3,should);
|
||||
addObject(2,est, "#000000");
|
||||
addObject(3,should, "#000000");
|
||||
}
|
||||
|
||||
void setEstAndShould2(const Point3& est, const Point3& should) {
|
||||
addObject(4,est, "#59C1DA");
|
||||
addObject(5,should, "#59C1DA");
|
||||
}
|
||||
|
||||
template <typename T> void addState(const GridWalkState<T>& n) {
|
||||
Point2 dir = Angle::getPointer(n.heading.getRAD());
|
||||
K::GnuplotPoint3 p1(n.node->x_cm, n.node->y_cm, n.node->z_cm);
|
||||
|
||||
Reference in New Issue
Block a user