Viam C++ SDK current
Loading...
Searching...
No Matches
mesh.hpp
1#pragma once
2
3#include <viam/sdk/common/proto_convert.hpp>
4
5#include <optional>
6#include <string>
7#include <vector>
8
9namespace viam {
10namespace common {
11namespace v1 {
12
13class Mesh;
14
15} // namespace v1
16} // namespace common
17} // namespace viam
18
19namespace viam {
20namespace sdk {
21
22struct mesh {
24 std::string content_type;
25
27 std::vector<unsigned char> data;
28
30 std::optional<std::string> original_file_source_path_diagnostic;
31
32 friend bool operator==(const mesh&, const mesh&) = default;
33};
34
35namespace proto_convert_details {
36
37template <>
39 void operator()(const mesh&, common::v1::Mesh*) const;
40};
41
42template <>
43struct from_proto_impl<common::v1::Mesh> {
44 mesh operator()(const common::v1::Mesh*) const;
45};
46
47} // namespace proto_convert_details
48
49} // namespace sdk
50} // namespace viam
Definition mesh.hpp:22
std::optional< std::string > original_file_source_path_diagnostic
Path the mesh was loaded from, relative to the kinematics file. Informational only.
Definition mesh.hpp:30
std::vector< unsigned char > data
Mesh bytes in the format named by content_type.
Definition mesh.hpp:27
std::string content_type
Content type of the mesh, e.g. stl or ply.
Definition mesh.hpp:24