2#include <ufo/io/file_handler.hpp>
3#include <ufo/io/obj.hpp>
12CloudProperties cloudPropertiesOBJ(std::filesystem::path
const& file)
14 FileHandler fp(file.c_str(),
"rb");
17 throw std::runtime_error(std::format(
18 "[UFO | Cloud Properties OBJ] Failed to open file: {}", file.string()));
23 prop.intensity =
false;
25 for (
char line[1024];
nullptr != std::fgets(line,
sizeof line, fp.get());) {
29 if (3 == std::sscanf(line,
"vn %f %f %f", &n.x, &n.y, &n.z)) {
31 }
else if (6 == std::sscanf(line,
"v %lf %lf %lf %f %f %f", &p.x, &p.y, &p.z, &c.red,
36 if (prop.color && prop.normal) {
All vision-related classes and functions.