diff --git a/main.cpp b/main.cpp index ae41cf3..6ae7c06 100644 --- a/main.cpp +++ b/main.cpp @@ -44,6 +44,31 @@ void draw(const std::vector &points) glutPostRedisplay(); } +void draw_origin() +{ + glBegin(GL_LINES); + + // X: + glColor3d(255, 0, 0); + glVertex3f(-1.0f, 0.0f, 0.0f); + glColor3d(0, 0, 0); + glVertex3f(10.0f, 0.0f, 0.0f); + + // Y: + glColor3d(0, 255, 0); + glVertex3f(0.0f, -1.0f, 0.0f); + glColor3d(0, 0, 0); + glVertex3f(0.0f, 10.0f, 0.0f); + + // Z: + glColor3d(0, 0, 255); + glVertex3f(0.0f, 0.0f, -10.0f); + glColor3d(0, 0, 0); + glVertex3f(0.0f, 0.0f, 10.0f); + + glEnd(); +} + void display() { // RESET: @@ -58,6 +83,8 @@ void display() 0.0, 6.0, 0.0, /* center is at */ 0.0, 1.0, 0.0); /* up is in positive Y direction */ + draw_origin(); + // DRAW TRACKS: for(auto track : tracks) draw(track); @@ -105,7 +132,7 @@ int main(int argc, char *argv[]) { auto extension = entry.path().extension(); if(extension == ".gpx") - files.push_back(entry.path().filename()); + files.push_back(entry.path().string()); } float file_diff_lat = -8;