-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathio_utils.h
65 lines (53 loc) · 1.55 KB
/
io_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#include <filesystem>
#include "type.h"
struct CurvatureInfo;
/**
* @brief Load a model file
* @param path path to the model file
* @param V vertices
* @param F faces
* @return true if the model is loaded successfully, false otherwise
*/
bool LoadModel(const std::filesystem::path& path, VectorArray& V, IndicesArray& F);
/**
* @brief Save curvatures to a json file
* @param filepath file path
* @param info curvature information
* @return true if the curvatures are saved successfully, false otherwise
*/
bool SaveCurvatures(const std::filesystem::path& filepath, const CurvatureInfo& info);
/**
* @brief Save the model to a vtk file
* @param filepath file path
* @param V vertices
* @param F faces
* @param curvature curvature information
* @return true if the vtk file is saved successfully, false otherwise
*/
bool SaveVtk(
const std::filesystem::path& filepath,
const VectorArray& V,
const IndicesArray& F,
const CurvatureInfo& curvature);
/**
* @brief Save a polyline to a file
* @param filepath file path
* @param V vertices
* @param selected selected vertices
* @return true if the polyline is saved successfully, false otherwise
*/
bool SaveCsv(
const std::filesystem::path& filepath,
const VectorArray& V,
const std::vector<int>& selected);
/**
* @brief Save a polyline to a file
* @param filepath file path
* @param V vertices
* @param selected selected vertices
* @return true if the polyline is saved successfully, false otherwise
*/
bool SaveCsv(
const std::filesystem::path& filepath,
const VectorArray& V);