MeshLib C++ Docs
Loading...
Searching...
No Matches
MRDraco.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4#ifndef MRIOEXTRAS_NO_DRACO
5#include "exports.h"
6
7#include <MRMesh/MRExpected.h>
11
12#include <filesystem>
13
14namespace MR
15{
18
19
29
30namespace MeshLoad
31{
32
36MRIOEXTRAS_API Expected<Mesh> fromDrc( const std::filesystem::path& file, const MeshLoadSettings& settings = {} );
37MRIOEXTRAS_API Expected<Mesh> fromDrc( std::istream& in, const MeshLoadSettings& settings = {} );
38
39}
40
41namespace MeshSave
42{
43
45MRIOEXTRAS_API Expected<void> toDrc( const Mesh& mesh, const std::filesystem::path& file, const DracoSaveOptions& options );
46MRIOEXTRAS_API Expected<void> toDrc( const Mesh& mesh, std::ostream& out, const DracoSaveOptions& options );
47MRIOEXTRAS_API Expected<void> toDrc( const Mesh& mesh, const std::filesystem::path& file, const SaveSettings& settings = {} );
48MRIOEXTRAS_API Expected<void> toDrc( const Mesh& mesh, std::ostream& out, const SaveSettings& settings = {} );
49
50}
51
52namespace PointsLoad
53{
54
56MRIOEXTRAS_API Expected<PointCloud> fromDrc( const std::filesystem::path& file, const PointsLoadSettings& settings = {} );
57MRIOEXTRAS_API Expected<PointCloud> fromDrc( std::istream& in, const PointsLoadSettings& settings = {} );
58
59}
60
61namespace PointsSave
62{
63
65MRIOEXTRAS_API Expected<void> toDrc( const PointCloud& points, const std::filesystem::path& file, const DracoSaveOptions& options );
66MRIOEXTRAS_API Expected<void> toDrc( const PointCloud& points, std::ostream& out, const DracoSaveOptions& options );
67MRIOEXTRAS_API Expected<void> toDrc( const PointCloud& points, const std::filesystem::path& file, const SaveSettings& settings = {} );
68MRIOEXTRAS_API Expected<void> toDrc( const PointCloud& points, std::ostream& out, const SaveSettings& settings = {} );
69
70}
71
72}
73#endif
Expected< void > toDrc(const PointCloud &points, const std::filesystem::path &file, const DracoSaveOptions &options)
saves in Google Draco .drc file
Expected< PointCloud > fromDrc(const std::filesystem::path &file, const PointsLoadSettings &settings={})
loads from Google Draco .drc file; if the file contains a mesh, then its points are returned without ...
tl::expected< T, E > Expected
Definition MRExpected.h:31
Expected< void > toDrc(const Mesh &mesh, const std::filesystem::path &file, const DracoSaveOptions &options)
saves in Google Draco .drc file
int positionQuantizationBits
Definition MRDraco.h:27
int compressionLevel
0 - fastest encoding and decoding but the worst compression, 10 - the best compression
Definition MRDraco.h:24
Expected< Mesh > fromDrc(const std::filesystem::path &file, const MeshLoadSettings &settings={})
compatibility names
Definition MRCtm.h:21
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
options for saving in Google Draco format
Definition MRDraco.h:22
setting for mesh loading from external format, and locations of optional output data
Definition MRMeshLoadSettings.h:14
Definition MRMesh.h:24
Definition MRPointCloud.h:17
structure with settings and side output parameters for loading point cloud
Definition MRPointsLoadSettings.h:13
determines how to save points/lines/mesh
Definition MRSaveSettings.h:20