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