Subversion Repositories gelsvn

Rev

Rev 321 | Rev 595 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 321 Rev 362
1
#include "obj_load.h"
1
#include "obj_load.h"
2
#include "Geometry/obj_load.h"
2
#include "Geometry/obj_load.h"
3
#include "HMesh/Manifold.h"
3
#include "HMesh/Manifold.h"
4
#include "build_manifold.h"
4
#include "build_manifold.h"
5
 
5
 
6
 
6
 
7
using namespace std;
7
using namespace std;
8
using namespace CGLA;
8
using namespace CGLA;
9
using namespace HMesh;
9
using namespace HMesh;
10
using namespace Geometry;
10
using namespace Geometry;
11
 
11
 
12
namespace HMesh
12
namespace HMesh
13
{
13
{
14
		bool obj_load(const std::string& filename, HMesh::Manifold& m)
14
		bool obj_load(const std::string& filename, HMesh::Manifold& m)
15
		{
15
		{
16
				TriMesh mesh;
16
				TriMesh mesh;
17
				Geometry::obj_load(filename, mesh);
17
				Geometry::obj_load(filename, mesh);
18
				
-
 
19
				vector<int> faces(mesh.geometry.no_faces(), 3);
-
 
20
				build_manifold(m, 
18
				build_manifold(m, mesh);
21
											 mesh.geometry.no_vertices(), 
-
 
22
											 &mesh.geometry.vertex(0), 
-
 
23
											 faces.size(), &faces[0], 
-
 
24
											 reinterpret_cast<const int*>(&mesh.geometry.face(0)));
-
 
25
				return true;
19
				return true;
26
		}
20
		}
27
}
21
}
28
 
22