ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
AutoIO.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <memory>
11 #include <string>
12 
13 #include "FileIO.h"
14 
15 class ccMesh;
16 class ccHObject;
17 
19 
21 namespace cloudViewer {
22 namespace io {
23 
26  bool enable_post_processing = false;
30  bool print_progress = false;
34  std::function<bool(double)> update_progress;
35 };
36 
39 std::shared_ptr<ccHObject> CV_IO_LIB_API
40 CreateEntityFromFile(const std::string& filename,
41  const std::string& format = "auto",
42  bool print_progress = false);
43 
47 bool CV_IO_LIB_API ReadEntity(const std::string& filename,
48  ccHObject& obj,
49  const std::string& format = "auto",
50  bool print_progress = false);
51 
57 bool CV_IO_LIB_API WriteEntity(const std::string& filename,
58  const ccHObject& obj,
59  bool write_ascii = false,
60  bool compressed = false,
61  bool print_progress = false);
62 
63 bool CV_IO_LIB_API AutoReadEntity(const std::string& filename,
64  ccHObject& entity,
66 
67 bool CV_IO_LIB_API AutoWriteEntity(const std::string& filename,
68  const ccHObject& entity,
70 
71 bool CV_IO_LIB_API AutoReadMesh(const std::string& filename,
72  ccMesh& mesh,
73  const ReadTriangleMeshOptions& params = {});
74 
75 bool CV_IO_LIB_API AutoWriteMesh(const std::string& filename,
76  const ccMesh& mesh,
77  bool write_ascii = false,
78  bool compressed = false,
79  bool write_vertex_normals = true,
80  bool write_vertex_colors = true,
81  bool write_triangle_uvs = true,
82  bool print_progress = false);
83 
84 } // namespace io
85 } // namespace cloudViewer
IsAscii write_ascii
Compressed compressed
std::string filename
#define CV_IO_LIB_API
Definition: CV_io.h:15
filament::Texture::InternalFormat format
cmdLineReadable * params[]
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Triangular mesh.
Definition: ecvMesh.h:35
bool AutoWriteMesh(const std::string &filename, const ccMesh &mesh, bool write_ascii=false, bool compressed=false, bool write_vertex_normals=true, bool write_vertex_colors=true, bool write_triangle_uvs=true, bool print_progress=false)
bool AutoReadEntity(const std::string &filename, ccHObject &entity, const ReadPointCloudOption &params)
bool AutoWriteEntity(const std::string &filename, const ccHObject &entity, const WritePointCloudOption &params)
bool ReadEntity(const std::string &filename, ccHObject &obj, const std::string &format="auto", bool print_progress=false)
bool AutoReadMesh(const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params={})
bool WriteEntity(const std::string &filename, const ccHObject &obj, bool write_ascii=false, bool compressed=false, bool print_progress=false)
std::shared_ptr< ccHObject > CreateEntityFromFile(const std::string &filename, const std::string &format="auto", bool print_progress=false)
Generic file read and write utility for python interface.
Optional parameters to ReadPointCloud.
Definition: FileIO.h:39
bool enable_post_processing
Enables post-processing on the mesh.
Definition: AutoIO.h:26
std::function< bool(double)> update_progress
Definition: AutoIO.h:34
Optional parameters to WritePointCloud.
Definition: FileIO.h:77