Subversion Repositories gelsvn

Rev

Rev 601 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
595 jab 1
/* ----------------------------------------------------------------------- *
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
3
 * Copyright (C) the authors and DTU Informatics
4
 * For license and list of authors, see ../../doc/intro.pdf
5
 * ----------------------------------------------------------------------- */
440 jab 6
 
7
#include "load.h"
8
#include "obj_load.h"
9
#include "ply_load.h"
601 jab 10
#include "../CGLA/Vec3i.h"
440 jab 11
 
12
using namespace std;
13
using namespace CGLA;
595 jab 14
//using namespace HMesh;
440 jab 15
 
16
namespace Geometry
17
{
18
 
19
	void load(const string& fn, TriMesh &mesh)
20
	{
21
		if(fn.substr(fn.length()-4,fn.length())==".obj")
22
		{
23
			obj_load(fn, mesh);
24
		}
25
		else if(fn.substr(fn.length()-4,fn.length())==".ply")
26
		{
27
			ply_load(fn, mesh);
28
		}	
29
		else
30
		{
31
			cout << "Either the format was unrecognized or the file did not have the appropriate extension" << endl;
32
			exit(0);
33
		}
34
	}
35
 
36
}
37