Rev 149 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#include "obj_load.h"
#include "Geometry/obj_load.h"
#include "HMesh/Manifold.h"
#include "build_manifold.h"
using namespace std;
using namespace CGLA;
using namespace HMesh;
using namespace Geometry;
namespace HMesh
{
bool obj_load(const std::string& filename, HMesh::Manifold& m)
{
TriMesh mesh;
Geometry::obj_load(filename, mesh);
vector<int> faces(mesh.geometry.no_faces(), 3);
build_manifold(m,
mesh.geometry.no_vertices(),
&mesh.geometry.vertex(0),
faces.size(), &faces[0],
reinterpret_cast<const int*>(&mesh.geometry.face(0)));
return true;
}
}