Rerun C++ SDK
Loading...
Searching...
No Matches
keypoint_pair.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/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 `Keypoints`.
20 struct KeypointPair {
21 /// The first point of the pair.
23
24 /// The second point of the pair.
26
27 public:
28 // Extensions to generated type defined in 'keypoint_pair_ext.cpp'
29
30 KeypointPair(uint16_t _keypoint0, uint16_t _keypoint1)
31 : keypoint0(_keypoint0), keypoint1(_keypoint1) {}
32
33 KeypointPair(std::pair<uint16_t, uint16_t> pair)
34 : keypoint0(pair.first), keypoint1(pair.second) {}
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 /// Fills an arrow array builder with an array of this type.
54 static rerun::Error fill_arrow_array_builder(
55 arrow::StructBuilder* builder, const datatypes::KeypointPair* elements,
56 size_t num_elements
57 );
58
59 /// Serializes an array of `rerun::datatypes::KeypointPair` into an arrow array.
60 static Result<std::shared_ptr<arrow::Array>> to_arrow(
61 const datatypes::KeypointPair* instances, size_t num_instances
62 );
63 };
64} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:87
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:72
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Datatype: A 16-bit ID representing a type of semantic keypoint within a class.
Definition keypoint_id.hpp:24
Datatype: A connection between two Keypoints.
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