32 std::vector<std::vector<int>>
faces;
ObjMeshData read_obj(const std::string &filepath)
读取 Wavefront OBJ 文件
void write_obj(const std::string &filepath, const ObjMeshData &data)
写入 Wavefront OBJ 文件
std::vector< std::vector< int > > faces
每个面的顶点索引列表(0-based)
std::vector< Vector3D > normals
顶点法线数组(可能为空)
bool has_texcoords() const
是否有纹理坐标数据
std::vector< std::vector< int > > face_texcoords
每个面的纹理坐标索引列表(0-based)
std::vector< std::string > face_materials
每个面对应的材质名称
std::vector< std::vector< int > > face_normals
每个面的法线索引列表(0-based)
std::vector< Point2D > texcoords
纹理坐标数组(可能为空)
std::vector< Point3D > vertices
顶点位置数组