contrib/brl/bbas/imesh/imesh_fileio.h
Go to the documentation of this file.
00001 // This is brl/bbas/imesh/imesh_fileio.h
00002 #ifndef imesh_fileio_h_
00003 #define imesh_fileio_h_
00004 //:
00005 // \file
00006 // \brief Functions for reading mesh files
00007 // \author Matt Leotta (mleotta@lems.brown.edu)
00008 // \date May 2, 2008
00009 
00010 #include <vcl_iostream.h>
00011 #include <vcl_string.h>
00012 #include "imesh_mesh.h"
00013 
00014 
00015 //: Read a mesh from a file, determine type from extension
00016 bool imesh_read(const vcl_string& filename, imesh_mesh& mesh);
00017 
00018 //: Read a mesh from a PLY2 stream
00019 bool imesh_read_ply2(vcl_istream& is, imesh_mesh& mesh);
00020 
00021 //: Read a mesh from a PLY2 file
00022 bool imesh_read_ply2(const vcl_string& filename, imesh_mesh& mesh);
00023 
00024 //: Read a mesh from a PLY file
00025 bool imesh_read_ply(const vcl_string& filename, imesh_mesh& mesh);
00026 
00027 //: Read a mesh from a PLY file
00028 bool imesh_read_ply(vcl_istream& is, imesh_mesh& mesh);
00029 
00030 //: Write a mesh to a PLY2 stream
00031 void imesh_write_ply2(vcl_ostream& os, const imesh_mesh& mesh);
00032 
00033 //: Write a mesh to a PLY2 file
00034 void imesh_write_ply2(const vcl_string& filename, const imesh_mesh& mesh);
00035 
00036 //: Read texture coordinates from a UV2 stream
00037 bool imesh_read_uv2(vcl_istream& is, imesh_mesh& mesh);
00038 
00039 //: Read texture coordinates from a UV2 file
00040 bool imesh_read_uv2(const vcl_string& filename, imesh_mesh& mesh);
00041 
00042 //: Read a mesh from a wavefront OBJ stream
00043 bool imesh_read_obj(vcl_istream& is, imesh_mesh& mesh);
00044 
00045 //: Read a mesh from a wavefront OBJ file
00046 bool imesh_read_obj(const vcl_string& filename, imesh_mesh& mesh);
00047 
00048 //: Write a mesh to a wavefront OBJ stream
00049 void imesh_write_obj(vcl_ostream& os, const imesh_mesh& mesh);
00050 
00051 //: Write a mesh to a wavefront OBJ file
00052 void imesh_write_obj(const vcl_string& filename, const imesh_mesh& mesh);
00053 
00054 //: Write a mesh into a kml file
00055 void imesh_write_kml(vcl_ostream& os, const imesh_mesh& mesh);
00056 
00057 //: Write a mesh into a kml collada file
00058 void imesh_write_kml_collada(vcl_ostream& os, const imesh_mesh& mesh);
00059 
00060 //: Write a mesh into a vrml file
00061 void imesh_write_vrml(vcl_ostream& os, const imesh_mesh& mesh);
00062 
00063 #endif // imesh_fileio_h_