ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
TriangleMeshIO.cpp
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 
9 
10 #include <benchmark/benchmark.h>
11 
15 
16 namespace cloudViewer {
17 namespace t {
18 namespace geometry {
19 
21 
22 void IOReadLegacyTriangleMesh(benchmark::State& state,
23  const std::string& input_file_path) {
24  ccMesh mesh;
25  cloudViewer::io::ReadTriangleMesh(input_file_path, mesh);
26 
27  for (auto _ : state) {
28  cloudViewer::io::ReadTriangleMesh(input_file_path, mesh);
29  }
30 }
31 
32 void IOReadTensorTriangleMesh(benchmark::State& state,
33  const std::string& input_file_path) {
35  t::io::ReadTriangleMesh(input_file_path, mesh);
36 
37  for (auto _ : state) {
38  t::io::ReadTriangleMesh(input_file_path, mesh);
39  }
40 }
41 
43  ->Unit(benchmark::kMillisecond);
44 
46  ->Unit(benchmark::kMillisecond);
47 
48 } // namespace geometry
49 } // namespace t
50 } // namespace cloudViewer
Triangular mesh.
Definition: ecvMesh.h:35
Data class for KnotMesh contains the KnotMesh.ply file.
Definition: Dataset.h:542
std::string GetPath() const
Path to the KnotMesh.ply file.
Definition: Dataset.h:547
A triangle mesh contains vertices and triangles.
Definition: TriangleMesh.h:98
bool ReadTriangleMesh(const std::string &filename, ccMesh &mesh, ReadTriangleMeshOptions params)
BENCHMARK_CAPTURE(VoxelDownSample, kReductionMean_0_01, core::Device("CPU:0"), 0.01, kReductionMean) -> Unit(benchmark::kMillisecond)
void IOReadLegacyTriangleMesh(benchmark::State &state, const std::string &input_file_path)
void IOReadTensorTriangleMesh(benchmark::State &state, const std::string &input_file_path)
bool ReadTriangleMesh(const std::string &filename, geometry::TriangleMesh &mesh, cloudViewer::io::ReadTriangleMeshOptions params)
Generic file read and write utility for python interface.