Commit 354b6b55 authored by Philip Trettner's avatar Philip Trettner
Browse files

added quick obj reader

parent d49eda5e
......@@ -301,3 +301,9 @@ void obj_reader::parse(std::istream &in, Mesh &mesh)
void polymesh::read_obj(const std::string &filename, Mesh &mesh, vertex_attribute<glm::vec3> &position)
obj_reader reader(filename, mesh);
position = reader.positions_vec3();
......@@ -14,6 +14,7 @@ void write_obj(std::string const& filename,
vertex_attribute<glm::vec3> const& position,
vertex_attribute<glm::vec2> const* tex_coord = nullptr,
vertex_attribute<glm::vec3> const* normal = nullptr);
void read_obj(std::string const& filename, Mesh& mesh, vertex_attribute<glm::vec3>& position);
struct obj_writer
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment