Geom Software - C++ Programming and Geometry Libraries
WOF Documentation pages v1.04
wof_api_io.h
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
16 
17 #pragma once
18 #include <vector>
19 #include "Point3.h"
20 #include "WofMesh.h"
21 
26 namespace GEOM_WOF {
39 {
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 
106 CLASS_DECLSPEC
107 bool readPly(const char* filename,bool bReadPoints, std::vector<Point3>& vPointsOut);
108 
109 
110 bool writePointsPly(const std::string & filename,
111  std::vector<GEOM_WOF::Point3>& vPoints,
112  bool bASCII
113  );
114 
115 
116 
117 // *** Read Points ***
127 CLASS_DECLSPEC
128 bool readPoints_ASCII(const char* filename,std::vector<Point3>& vPoints);
129 
130 
131 
141 CLASS_DECLSPEC
142 bool readPoints_BIN(const char* filename, std::vector<Point3>& vPointsOut);
143 
145 // *** Read mesh ***
147 
153 CLASS_DECLSPEC
154 bool readSTL_ASCII(const char* filename,std::vector<Point3>& vTriangleCorners);
155 
156 
157 
169 CLASS_DECLSPEC
170 bool readPoints_auto(std::string& inFilename,std::vector<Point3>& vPoints);
171 
172 
173 
188 CLASS_DECLSPEC
189 bool writePoints_auto(std::string& outFilename,std::vector<Point3>& vPoints,bool bASCII);
190 
191 
192 
207 CLASS_DECLSPEC
208 bool writeMesh_auto(const std::string& filename,std::shared_ptr<WofMesh> pWofMesh,bool bASCII);
209 
210 
213 } // Namespace
bool writePoints_ASCII(const char *filename, const std::vector< Point3 > &vPoints)
Write points to an ASCII file.
bool readPoints_ASCII(const char *filename, std::vector< Point3 > &vPoints)
Read points from an ASCII file.
FileType BIN based on the filename extension [.bin].
Definition: wof_api_io.h:43
bool writePoints_auto(std::string &outFilename, std::vector< Point3 > &vPoints, bool bASCII)
Write points to a file.
FileType STL based on the filename extension [.stl].
Definition: wof_api_io.h:40
bool readPoints_BIN(const char *filename, std::vector< Point3 > &vPointsOut)
Read points from a binary file.
FileType
Filetype.
Definition: wof_api_io.h:38
FileType XYZ based on the filename extensions [.xyz|.txt|.asc].
Definition: wof_api_io.h:42
bool writeMesh_auto(const std::string &filename, std::shared_ptr< WofMesh > pWofMesh, bool bASCII)
Write mesh to a file.
bool writePoints_BIN(const char *filename, std::vector< Point3 > &vPoints)
Write points to a binary file.
bool readSTL_ASCII(const char *filename, std::vector< Point3 > &vTriangleCorners)
Read a mesh from ASCII STL.
bool readPly(const char *filename, bool bReadPoints, std::vector< Point3 > &vPointsOut)
Write points to a *.ply file.
Definition: Point3.h:23
FileType UNKNOWN for unknown extensions.
Definition: wof_api_io.h:45
FileType PLY based on the filename extension [.ply].
Definition: wof_api_io.h:41
FileType LIST based on the filename extension [.list].
Definition: wof_api_io.h:44
bool readPoints_auto(std::string &inFilename, std::vector< Point3 > &vPoints)
Read points from a file (automatic detection)
FileType getFileType(const std::string &filename)
Get File Type.