Rerun C++ SDK
Loading...
Searching...
No Matches
mesh_properties.hpp
1// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/re_types/definitions/rerun/components/mesh_properties.fbs".
3
4#pragma once
5
6#include "../collection.hpp"
7#include "../datatypes/mesh_properties.hpp"
8#include "../result.hpp"
9
10#include <cstdint>
11#include <memory>
12#include <optional>
13#include <utility>
14
15namespace arrow {
16 class Array;
17 class DataType;
18 class StructBuilder;
19} // namespace arrow
20
21namespace rerun::components {
22 /// **Component**: Optional triangle indices for a mesh.
25
26 public:
27 // Extensions to generated type defined in 'mesh_properties_ext.cpp'
28
29 static MeshProperties from_triangle_indices(Collection<uint32_t> indices) {
30 return MeshProperties(std::move(indices));
31 }
32
33 public:
34 MeshProperties() = default;
35
36 MeshProperties(rerun::datatypes::MeshProperties props_) : props(std::move(props_)) {}
37
39 props = std::move(props_);
40 return *this;
41 }
42
43 MeshProperties(std::optional<rerun::Collection<uint32_t>> indices_)
44 : props(std::move(indices_)) {}
45
46 MeshProperties& operator=(std::optional<rerun::Collection<uint32_t>> indices_) {
47 props = std::move(indices_);
48 return *this;
49 }
50
51 /// Cast to the underlying MeshProperties datatype
53 return props;
54 }
55 };
56} // namespace rerun::components
57
58namespace rerun {
59 template <typename T>
60 struct Loggable;
61
62 /// \private
63 template <>
64 struct Loggable<components::MeshProperties> {
65 static constexpr const char Name[] = "rerun.components.MeshProperties";
66
67 /// Returns the arrow data type this type corresponds to.
68 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
69
70 /// Fills an arrow array builder with an array of this type.
71 static rerun::Error fill_arrow_array_builder(
72 arrow::StructBuilder* builder, const components::MeshProperties* elements,
73 size_t num_elements
74 );
75
76 /// Serializes an array of `rerun::components::MeshProperties` into an arrow array.
77 static Result<std::shared_ptr<arrow::Array>> to_arrow(
78 const components::MeshProperties* instances, size_t num_instances
79 );
80 };
81} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:47
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:87
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:69
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Component: Optional triangle indices for a mesh.
Definition mesh_properties.hpp:23
Datatype: Optional triangle indices for a mesh.
Definition mesh_properties.hpp:22