-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathIO.h
executable file
·55 lines (45 loc) · 2.27 KB
/
IO.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef MESHING_IO_H
#define MESHING_IO_H
#include <iosfwd>
#include "TriMesh.h"
namespace GLDraw {
//forward declaration
class GeometryAppearance;
};
namespace Meshing {
///Import will try to determine the file type via the file extension
bool Import(const char* fn,TriMesh& tri);
///Import will try to determine the file type via the file extension.
///If the file format does not contain any appearance information,
///then the appearance argument will be untouched.
bool Import(const char* fn,TriMesh& tri,GLDraw::GeometryAppearance& appearance);
///Export will try to determine the file type via the file extension
bool Export(const char* fn,const TriMesh& tri);
///Export will try to determine the file type via the file extension
bool Export(const char* fn,const TriMesh& tri,const GLDraw::GeometryAppearance& appearance);
///Returns true if the extension is a file type that we can load from
bool CanLoadTriMeshExt(const char* ext);
///Returns true if the extension is a file type that we can save to
bool CanSaveTriMeshExt(const char* ext);
///Loads from VRML file format: not implemented.
bool LoadVRML(std::istream& in,TriMesh& tri);
///Saves to VRML file format: not implemented.
bool SaveVRML(std::ostream& out,const TriMesh& tri);
///Loads from the GeomView Object File Format (OFF)
bool LoadOFF(std::istream& in,TriMesh& tri);
///Saves to the GeomView Object File Format (OFF)
bool SaveOFF(std::ostream& out,const TriMesh& tri);
///Loads using Assimp if available on your system
bool LoadAssimp(const char* fn,TriMesh& tri);
///Loads using Assimp if available on your system
bool LoadAssimp(const char* fn,TriMesh& tri,GLDraw::GeometryAppearance& appearance);
///Loads using Assimp if available on your system, extracts individual meshes
bool LoadAssimp(const char* fn,vector<TriMesh>& meshes);
///Loads using Assimp if available on your system, extracts individual meshes
bool LoadAssimp(const char* fn,vector<TriMesh>& meshes,vector<GLDraw::GeometryAppearance>& appearances);
///Saves using Assimp if available on your system (not implemented)
bool SaveAssimp(const char* fn,const TriMesh& tri);
///Saves using Assimp if available on your system (not implemented)
bool SaveAssimp(const char* fn,const TriMesh& tri,const GLDraw::GeometryAppearance& appearance);
} //namespace Meshing
#endif