Files
ViewDesignEngine/include/vde/foundation/io_obj.h
T

18 lines
459 B
C++
Raw Normal View History

#pragma once
#include <string>
#include <vector>
#include "vde/foundation/math_types.h"
namespace vde::foundation {
struct ObjMeshData {
std::vector<Point3D> vertices;
std::vector<Vector3D> normals;
std::vector<std::vector<int>> faces; // vertex indices (1-based in file, 0-based here)
};
ObjMeshData read_obj(const std::string& filepath);
void write_obj(const std::string& filepath, const ObjMeshData& data);
} // namespace vde::foundation