Geom Software - C++ Programming and Geometry Libraries
FADEPLACEHOLDER Documentation pages v1.03
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 
22 namespace GEOM_WOF {
23 
24 
32 {
33  FT_STL,
34  FT_PLY,
35  FT_XYZ,
36  FT_BIN,
37  FT_LIST,
38  FT_UNKNOWN
39 };
40 
41 
46 CLASS_DECLSPEC
47 FileType getFileType(const std::string& filename);
48 
49 
50 
51 // *** Write Points: ASCII, binary, Ply(ASCII+binary) ***
66 CLASS_DECLSPEC
67 bool writePoints_ASCII(const char* filename,const std::vector<Point3>& vPoints);
68 
69 
70 
89 CLASS_DECLSPEC
90 bool writePoints_BIN(const char* filename,std::vector<Point3>& vPoints);
91 
92 
93 
103 CLASS_DECLSPEC
104 bool readPly(const char* filename,bool bUniquePoints, std::vector<Point3>& vPointsOut);
105 
106 
107 bool writePointsPly(const std::string & filename,
108  std::vector<GEOM_WOF::Point3>& vPoints,
109  bool bASCII
110  );
111 
112 
113 
114 // *** Read Points ***
124 CLASS_DECLSPEC
125 bool readPoints_ASCII(const char* filename,std::vector<Point3>& vPoints);
126 
127 
128 
136 CLASS_DECLSPEC
137 bool readPoints_BIN(const char* filename, std::vector<Point3>& vPointsIn);
138 
139 
140 
142  //*
143  //* @param filename is a binary input file
144  //* @param vPointsIn is used to return the points
145  //*
146  //* @return the number of points or -1 when the operation failed.
147 //*/
148 //CLASS_DECLSPEC
149 //int readPointsPly(const char* filename, std::vector<Point3>& vPointsIn);
150 
151 
152 
153 // *** Read mesh ***
160 CLASS_DECLSPEC
161 bool readSTL_ASCII(const char* filename,std::vector<Point3>& vTriangleCorners);
162 
163 
164 
176 CLASS_DECLSPEC
177 bool readPoints_auto(std::string& inFilename,std::vector<Point3>& vPoints);
178 
179 
180 
195 CLASS_DECLSPEC
196 double writePoints_auto(std::string& outFilename,std::vector<Point3>& vPoints,bool bASCII);
197 
198 
199 
214 CLASS_DECLSPEC
215 double writeMesh_auto(const std::string& filename,std::shared_ptr<WofMesh> pWofMesh,bool bASCII);
216 
217 
220 } // 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.
double writeMesh_auto(const std::string &filename, std::shared_ptr< WofMesh > pWofMesh, bool bASCII)
Write mesh to a file.
bool readPly(const char *filename, bool bUniquePoints, std::vector< Point3 > &vPointsOut)
Write points to a *.ply file.
FileType
Filetype.
Definition: wof_api_io.h:31
bool writePoints_BIN(const char *filename, std::vector< Point3 > &vPoints)
Write points to a binary file.
bool readPoints_BIN(const char *filename, std::vector< Point3 > &vPointsIn)
Read points from a binary file.
bool readSTL_ASCII(const char *filename, std::vector< Point3 > &vTriangleCorners)
Read points from a *.ply file (ASCII or Binary)
Definition: Point3.h:23
double writePoints_auto(std::string &outFilename, std::vector< Point3 > &vPoints, bool bASCII)
Write points to a file.
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.