Subversion Repositories gelsvn

Rev

Rev 383 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
383 jab 1
/*
2
 *  load.cpp
3
 *  GEL
4
 *
5
 *  Created by J. Andreas Bærentzen on 17/08/08.
6
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
7
 *
8
 */
9
 
10
#include <string>
11
#include "load.h"
12
 
13
#include "ply_load.h"
14
#include "x3d_load.h"
15
#include "obj_load.h"
16
 
17
using namespace std;
18
 
19
namespace HMesh
20
{
21
	bool load(const std::string& file_name, HMesh::Manifold& mani)
22
	{
392 jab 23
		if(file_name == "") 
24
			return false;
383 jab 25
		if(file_name.substr(file_name.length()-4,file_name.length())==".obj")
26
			return obj_load(file_name, mani);
27
		else if(file_name.substr(file_name.length()-4,file_name.length())==".x3d")
28
			return x3d_load(file_name, mani);
29
		else if(file_name.substr(file_name.length()-4,file_name.length())==".ply")
30
			return ply_load(file_name, mani);
31
		return false;
32
	}
33
}