Geom Software - C++ Programming and Geometry Libraries
WOF Documentation pages v1.16
wof_api_io.h
Go to the documentation of this file.
1 // Copyright (C) Geom Software e.U, Bernhard Kornberger, Graz/Austria
2 //
3 // This file is part of the WOF software. WOF is commercial software.
4 // Users holding a license may use this file in accordance with the
5 // License Agreement.
6 //
7 // This software is provided AS IS with NO WARRANTY OF ANY KIND,
8 // INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
9 // FOR A PARTICULAR PURPOSE.
10 //
11 // Please contact the author if any conditions of this licensing are
12 // not clear to you.
13 //
14 // Author: Bernhard Kornberger, bkorn (at) geom.at
15 // http://www.geom.at
17 #pragma once
18 #include <vector>
19 #include "Point3.h"
20 #include "Mesh.h"
21 
26 namespace GEOM_WOF {
39 {
45  FT_UNKNOWN
46 };
47 
48 
53 CLASS_DECLSPEC
54 FileType getFileType(const std::string& filename);
55 
56 
57 
58 // *** Write Points: ASCII, binary, Ply(ASCII+binary) ***
73 CLASS_DECLSPEC
74 bool writePoints_ASCII(const char* filename,const std::vector<Point3>& vPoints);
75 
76 
77 
92 CLASS_DECLSPEC
93 bool writePoints_BIN(const char* filename,std::vector<Point3>& vPoints);
94 
95 
96 
112 CLASS_DECLSPEC
113 bool readPly(const char* filename,bool bReadPoints, std::vector<Point3>& vPointsOut);
114 
115 CLASS_DECLSPEC
116 bool writePointsPly(const std::string & filename,
117  std::vector<GEOM_WOF::Point3>& vPoints,
118  bool bASCII
119  );
120 
121 
122 
123 // *** Read Points ***
133 CLASS_DECLSPEC
134 bool readPoints_ASCII(const char* filename,std::vector<Point3>& vPoints);
135 
136 
137 
147 CLASS_DECLSPEC
148 bool readPoints_BIN(const char* filename, std::vector<Point3>& vPointsOut);
149 
151 // *** Read mesh ***
153 
159 CLASS_DECLSPEC
160 bool readSTL_ASCII(const char* filename,std::vector<Point3>& vTriangleCorners);
161 
162 
163 
178 CLASS_DECLSPEC
179 bool readPoints_auto(std::string& inFilename,std::vector<Point3>& vPoints);
180 
181 
182 
197 CLASS_DECLSPEC
198 bool writePoints_auto(std::string& outFilename,std::vector<Point3>& vPoints,bool bASCII);
199 
200 
201 
216 CLASS_DECLSPEC
217 bool writeMesh_auto(const std::string& filename,std::shared_ptr<Mesh> pMesh,bool bASCII);
218 
219 
222 } // Namespace
bool writePoints_ASCII(const char *filename, const std::vector< Point3 > &vPoints)
Write points to an ASCII file.
bool readSTL_ASCII(const char *filename, std::vector< Point3 > &vTriangleCorners)
Read a mesh from ASCII STL.
bool writePoints_BIN(const char *filename, std::vector< Point3 > &vPoints)
Write points to a binary file.
FileType getFileType(const std::string &filename)
Get File Type.
bool readPoints_ASCII(const char *filename, std::vector< Point3 > &vPoints)
Read points from an ASCII file.
FileType
Filetype.
Definition: wof_api_io.h:39
bool readPoints_BIN(const char *filename, std::vector< Point3 > &vPointsOut)
Read points from a binary file.
bool writeMesh_auto(const std::string &filename, std::shared_ptr< Mesh > pMesh, bool bASCII)
Write mesh to a file.
bool readPoints_auto(std::string &inFilename, std::vector< Point3 > &vPoints)
Read points from a file (automatic detection)
bool writePoints_auto(std::string &outFilename, std::vector< Point3 > &vPoints, bool bASCII)
Write points to a file.
bool readPly(const char *filename, bool bReadPoints, std::vector< Point3 > &vPointsOut)
Write points to a *.ply file.
@ FT_UNKNOWN
FileType UNKNOWN for unknown extensions.
Definition: wof_api_io.h:45
@ FT_PLY
FileType PLY based on the filename extension [.ply].
Definition: wof_api_io.h:41
@ FT_BIN
FileType BIN based on the filename extension [.bin].
Definition: wof_api_io.h:43
@ FT_XYZ
FileType XYZ based on the filename extensions [.xyz|.txt|.asc].
Definition: wof_api_io.h:42
@ FT_LIST
FileType LIST based on the filename extension [.list].
Definition: wof_api_io.h:44
@ FT_STL
FileType STL based on the filename extension [.stl].
Definition: wof_api_io.h:40
Definition: Point3.h:23