Rerun C++ SDK
Loading...
Searching...
No Matches
keypoint_pair.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/datatypes/keypoint_pair.fbs".
3
4#pragma once
5
6#include "../component_descriptor.hpp"
7#include "../result.hpp"
8#include "keypoint_id.hpp"
9
10#include <cstdint>
11#include <memory>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class StructBuilder;
17} // namespace arrow
18
19namespace rerun::datatypes {
20 /// **Datatype**: A connection between two `datatypes::KeypointId`s.
21 struct KeypointPair {
22 /// The first point of the pair.
24
25 /// The second point of the pair.
27
28 public: // START of extensions from keypoint_pair_ext.cpp:
29 KeypointPair(uint16_t _keypoint0, uint16_t _keypoint1)
30 : keypoint0(_keypoint0), keypoint1(_keypoint1) {}
31
32 KeypointPair(std::pair<uint16_t, uint16_t> pair)
33 : keypoint0(pair.first), keypoint1(pair.second) {}
34
35 // END of extensions from keypoint_pair_ext.cpp, start of generated code:
36
37 public:
38 KeypointPair() = default;
39 };
40} // namespace rerun::datatypes
41
42namespace rerun {
43 template <typename T>
44 struct Loggable;
45
46 /// \private
47 template <>
48 struct Loggable<datatypes::KeypointPair> {
49 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.KeypointPair";
50
51 /// Returns the arrow data type this type corresponds to.
52 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
53
54 /// Serializes an array of `rerun::datatypes::KeypointPair` into an arrow array.
55 static Result<std::shared_ptr<arrow::Array>> to_arrow(
56 const datatypes::KeypointPair* instances, size_t num_instances
57 );
58
59 /// Fills an arrow array builder with an array of this type.
60 static rerun::Error fill_arrow_array_builder(
61 arrow::StructBuilder* builder, const datatypes::KeypointPair* elements,
62 size_t num_elements
63 );
64 };
65} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:83
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Datatype: A 16-bit ID representing a type of semantic keypoint within a class.
Definition keypoint_id.hpp:25
Datatype: A connection between two datatypes::KeypointIds.
Definition keypoint_pair.hpp:21
rerun::datatypes::KeypointId keypoint0
The first point of the pair.
Definition keypoint_pair.hpp:23
rerun::datatypes::KeypointId keypoint1
The second point of the pair.
Definition keypoint_pair.hpp:26