ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
TriangleMeshIO.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 <string>
11 
14 
15 namespace cloudViewer {
16 namespace t {
17 namespace io {
18 
21 std::shared_ptr<geometry::TriangleMesh> CreateMeshFromFile(
22  const std::string &filename, bool print_progress = false);
23 
32 bool ReadTriangleMesh(const std::string &filename,
35 
43 bool WriteTriangleMesh(const std::string &filename,
44  const geometry::TriangleMesh &mesh,
45  bool write_ascii = false,
46  bool compressed = false,
47  bool write_vertex_normals = true,
48  bool write_vertex_colors = true,
49  bool write_triangle_uvs = true,
50  bool print_progress = false);
51 
53  const std::string &filename,
56 
58  const std::string &filename,
61 
62 bool WriteTriangleMeshUsingASSIMP(const std::string &filename,
63  const geometry::TriangleMesh &mesh,
64  const bool write_ascii,
65  const bool compressed,
66  const bool write_vertex_normals,
67  const bool write_vertex_colors,
68  const bool write_triangle_uvs,
69  const bool print_progress);
70 
71 bool WriteTriangleMeshToNPZ(const std::string &filename,
72  const geometry::TriangleMesh &mesh,
73  const bool write_ascii,
74  const bool compressed,
75  const bool write_vertex_normals,
76  const bool write_vertex_colors,
77  const bool write_triangle_uvs,
78  const bool print_progress);
79 
80 } // namespace io
81 } // namespace t
82 } // namespace cloudViewer
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
cloudViewer::t::io::WriteTriangleMeshUsingASSIMP
bool WriteTriangleMeshUsingASSIMP(const std::string &filename, const geometry::TriangleMesh &mesh, const bool write_ascii, const bool compressed, const bool write_vertex_normals, const bool write_vertex_colors, const bool write_triangle_uvs, const bool print_progress)
Definition: FileASSIMP.cpp:371
filename
std::string filename
Definition: PointCloudIO.cpp:47
cloudViewer::t::io::ReadTriangleMeshUsingASSIMP
bool ReadTriangleMeshUsingASSIMP(const std::string &filename, geometry::TriangleMesh &mesh, const cloudViewer::io::ReadTriangleMeshOptions &params)
Definition: FileASSIMP.cpp:46
TriangleMeshIO.h
cloudViewer::t::io::WriteTriangleMesh
bool WriteTriangleMesh(const std::string &filename, const geometry::TriangleMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
Definition: TriangleMeshIO.cpp:114
cloudViewer::geometry::TriangleMesh
::ccMesh TriangleMesh
Definition: TriangleMesh.h:19
TriangleMesh.h
cloudViewer::t::io::CreateMeshFromFile
std::shared_ptr< geometry::TriangleMesh > CreateMeshFromFile(const std::string &filename, bool print_progress)
Definition: TriangleMeshIO.cpp:52
write_ascii
IsAscii write_ascii
Definition: PointCloudIO.cpp:48
cloudViewer::t::io::ReadTriangleMeshFromNPZ
bool ReadTriangleMeshFromNPZ(const std::string &filename, geometry::TriangleMesh &mesh, const cloudViewer::io::ReadTriangleMeshOptions &params)
Definition: TriangleMeshIO.cpp:148
compressed
Compressed compressed
Definition: PointCloudIO.cpp:49
cloudViewer::t::io::WriteTriangleMeshToNPZ
bool WriteTriangleMeshToNPZ(const std::string &filename, const geometry::TriangleMesh &mesh, const bool write_ascii, const bool compressed, const bool write_vertex_normals, const bool write_vertex_colors, const bool write_triangle_uvs, const bool print_progress)
Definition: TriangleMeshIO.cpp:216
cloudViewer::t::io::ReadTriangleMesh
bool ReadTriangleMesh(const std::string &filename, geometry::TriangleMesh &mesh, cloudViewer::io::ReadTriangleMeshOptions params)
Definition: TriangleMeshIO.cpp:74
cloudViewer::io::ReadTriangleMeshOptions
Definition: AutoIO.h:24