18 lines
459 B
C++
18 lines
459 B
C++
|
|
#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
|