temporarily disable main.cpp

This commit is contained in:
2025-08-25 04:11:43 -05:00
parent c403b06bd9
commit 13fcaede51

View File

@@ -1,46 +1,46 @@
#include <iostream> //#include <iostream>
#include <string> //#include <string>
#include <map> //#include <map>
//
#include "camera_poses.hpp" //#include "camera_poses.hpp"
#include "live_plotter.hpp" //#include "live_plotter.hpp"
//
static std::map<std::string, pointid> name_to_id; //static std::map<std::string, pointid> name_to_id;
//
int main() { //int main() {
Array<glm::mat2x3> camera_pose_axes = { NULL, 0 }; // Array<glm::mat2x3> camera_pose_axes = { NULL, 0 };
if (!parse_poses(&camera_pose_axes, "poses.csv")) { // if (!parse_poses(&camera_pose_axes, "poses.csv")) {
return -1; // return -1;
} // }
//
start(800, 800); // start(800, 800);
//
for (int i = 0; i < camera_pose_axes.len; i++) { // for (int i = 0; i < camera_pose_axes.len; i++) {
glm::vec3 p = camera_pose_axes[i][0]; // glm::vec3 p = camera_pose_axes[i][0];
glm::vec3 color = camera_pose_axes[i][1]; // glm::vec3 color = camera_pose_axes[i][1];
pointid id = create_point(p.x, p.y, p.z); // pointid id = create_point(p.x, p.y, p.z);
set_color(id, color.x, color.y, color.z); // set_color(id, color.x, color.y, color.z);
set_scale(id, 10); // set_scale(id, 10);
} // }
//
while (true) { // while (true) {
std::string line; // std::string line;
std::getline(std::cin, line); // std::getline(std::cin, line);
Array<char*> words = split_str(line.c_str()); // Array<char*> words = split_str(line.c_str());
if (!words.len == 4) // if (!words.len == 4)
return NULL; // return NULL;
printf("Received: %s, %s, %s, %s\n", words[0], words[1], words[2], words[3]); // echo for debugging // printf("Received: %s, %s, %s, %s\n", words[0], words[1], words[2], words[3]); // echo for debugging
std::string name = std::string(words[0]); // std::string name = std::string(words[0]);
float x = atof(words[1]); // float x = atof(words[1]);
float y = atof(words[2]); // float y = atof(words[2]);
float z = atof(words[3]); // float z = atof(words[3]);
//
if (auto it = name_to_id.find(name); it != name_to_id.end()) { // if (auto it = name_to_id.find(name); it != name_to_id.end()) {
update_point(it->second, x, y, z); // update_point(it->second, x, y, z);
} else { // } else {
name_to_id[name] = create_point(x, y, z); // name_to_id[name] = create_point(x, y, z);
set_lifetime(name_to_id[name], 0.2); // set_lifetime(name_to_id[name], 0.2);
set_scale(name_to_id[name], 15); // set_scale(name_to_id[name], 15);
} // }
} // }
} //}