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 "../result.hpp"
7#include "keypoint_id.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 class Array;
14 class DataType;
15 class StructBuilder;
16} // namespace arrow
17
18namespace rerun::datatypes {
19 /// **Datatype**: A connection between two `datatypes::KeypointId`s.
20 struct KeypointPair {
21 /// The first point of the pair.
23
24 /// The second point of the pair.
26
27 public: // START of extensions from keypoint_pair_ext.cpp:
28 KeypointPair(uint16_t _keypoint0, uint16_t _keypoint1)
29 : keypoint0(_keypoint0), keypoint1(_keypoint1) {}
30
31 KeypointPair(std::pair<uint16_t, uint16_t> pair)
32 : keypoint0(pair.first), keypoint1(pair.second) {}
33
34 // END of extensions from keypoint_pair_ext.cpp, start of generated code:
35
36 public:
37 KeypointPair() = default;
38 };
39} // namespace rerun::datatypes
40
41namespace rerun {
42 template <typename T>
43 struct Loggable;
44
45 /// \private
46 template <>
47 struct Loggable<datatypes::KeypointPair> {
48 static constexpr const char Name[] = "rerun.datatypes.KeypointPair";
49
50 /// Returns the arrow data type this type corresponds to.
51 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
52
53 /// Serializes an array of `rerun::datatypes::KeypointPair` into an arrow array.
54 static Result<std::shared_ptr<arrow::Array>> to_arrow(
55 const datatypes::KeypointPair* instances, size_t num_instances
56 );
57
58 /// Fills an arrow array builder with an array of this type.
59 static rerun::Error fill_arrow_array_builder(
60 arrow::StructBuilder* builder, const datatypes::KeypointPair* elements,
61 size_t num_elements
62 );
63 };
64} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:91
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:78
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Datatype: A 16-bit ID representing a type of semantic keypoint within a class.
Definition keypoint_id.hpp:24
Datatype: A connection between two datatypes::KeypointIds.
Definition keypoint_pair.hpp:20
rerun::datatypes::KeypointId keypoint0
The first point of the pair.
Definition keypoint_pair.hpp:22
rerun::datatypes::KeypointId keypoint1
The second point of the pair.
Definition keypoint_pair.hpp:25