KrisLibrary  1.0.0
meshing/IO.h
1 #ifndef MESHING_IO_H
2 #define MESHING_IO_H
3 
4 #include <iosfwd>
5 #include "TriMesh.h"
6 
7 namespace GLDraw {
8  //forward declaration
9  class GeometryAppearance;
10 };
11 
12 namespace Meshing {
13 
15 bool Import(const char* fn,TriMesh& tri);
19 bool Import(const char* fn,TriMesh& tri,GLDraw::GeometryAppearance& appearance);
21 bool Export(const char* fn,const TriMesh& tri);
23 bool Export(const char* fn,const TriMesh& tri,const GLDraw::GeometryAppearance& appearance);
24 
26 bool CanLoadTriMeshExt(const char* ext);
28 bool CanSaveTriMeshExt(const char* ext);
29 
31 bool LoadVRML(std::istream& in,TriMesh& tri);
33 bool SaveVRML(std::ostream& out,const TriMesh& tri);
34 
36 bool LoadOFF(std::istream& in,TriMesh& tri);
38 bool SaveOFF(std::ostream& out,const TriMesh& tri);
39 
41 bool LoadOBJ(const char* fn,TriMesh& tri);
43 bool LoadOBJ(const char* fn,TriMesh& tri,GLDraw::GeometryAppearance& app);
45 bool SaveOBJ(const char* fn,const TriMesh& tri);
47 bool SaveOBJ(const char* fn,const TriMesh& tri,const GLDraw::GeometryAppearance& app);
48 
50 bool LoadAssimp(const char* fn,TriMesh& tri);
52 bool LoadAssimp(const char* fn,TriMesh& tri,GLDraw::GeometryAppearance& appearance);
54 bool LoadAssimp(const char* fn,vector<TriMesh>& meshes);
56 bool LoadAssimp(const char* fn,vector<TriMesh>& meshes,vector<GLDraw::GeometryAppearance>& appearances);
58 bool SaveAssimp(const char* fn,const TriMesh& tri);
60 bool SaveAssimp(const char* fn,const TriMesh& tri,const GLDraw::GeometryAppearance& appearance);
61 
62 } //namespace Meshing
63 
64 #endif
bool CanSaveTriMeshExt(const char *ext)
Returns true if the extension is a file type that we can save to.
Definition: meshing/IO.cpp:84
The namespace for all classes/functions in the Meshing package.
Definition: AnyGeometry.h:10
bool CanLoadTriMeshExt(const char *ext)
Returns true if the extension is a file type that we can load from.
Definition: meshing/IO.cpp:69
A class for coloring, texturing, and drawing meshes in OpenGL.
Definition: GeometryAppearance.h:42
bool SaveOBJ(const char *fn, const TriMesh &tri)
Saves to the Wavefront OBJ file format.
Definition: meshing/IO.cpp:559
bool Export(const char *fn, const TriMesh &tri)
Export will try to determine the file type via the file extension.
Definition: meshing/IO.cpp:186
bool SaveVRML(std::ostream &out, const TriMesh &tri)
Saves to VRML file format.
Definition: meshing/IO.cpp:241
bool LoadAssimp(const char *fn, TriMesh &mesh)
Loads using Assimp if available on your system.
Definition: meshing/IO.cpp:849
bool LoadVRML(std::istream &in, TriMesh &tri)
Loads from VRML file format.
Definition: meshing/IO.cpp:234
Contains all definitions in the GLDraw package.
Definition: AnyGeometry.h:13
bool LoadOFF(std::istream &in, TriMesh &tri)
Loads from the GeomView Object File Format (OFF)
Definition: meshing/IO.cpp:248
bool LoadOBJ(const char *fn, FILE *f, TriMesh &tri, GeometryAppearance &app)
Loads from the Wavefront OBJ format, with per-vertex colors?
Definition: meshing/IO.cpp:411
bool SaveAssimp(const char *fn, const TriMesh &mesh)
Saves using Assimp if available on your system (not implemented)
Definition: meshing/IO.cpp:861
bool SaveOFF(std::ostream &out, const TriMesh &tri)
Saves to the GeomView Object File Format (OFF)
Definition: meshing/IO.cpp:339
bool Import(const char *fn, TriMesh &tri)
Import will try to determine the file type via the file extension.
Definition: meshing/IO.cpp:104