Rerun C++ SDK
Loading...
Searching...
No Matches
draw_order.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/draw_order.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <cstdint>
9#include <memory>
10
11namespace arrow {
12 /// \private
13 template <typename T>
14 class NumericBuilder;
15
16 class Array;
17 class DataType;
18 class FloatType;
19 using FloatBuilder = NumericBuilder<FloatType>;
20} // namespace arrow
21
22namespace rerun::components {
23 /// **Component**: Draw order used for the display order of 2D elements.
24 ///
25 /// Higher values are drawn on top of lower values.
26 /// An entity can have only a single draw order component.
27 /// Within an entity draw order is governed by the order of the components.
28 ///
29 /// Draw order for entities with the same draw order is generally undefined.
30 struct DrawOrder {
31 float value;
32
33 public:
34 DrawOrder() = default;
35
36 DrawOrder(float value_) : value(value_) {}
37
38 DrawOrder& operator=(float value_) {
39 value = value_;
40 return *this;
41 }
42 };
43} // namespace rerun::components
44
45namespace rerun {
46 template <typename T>
47 struct Loggable;
48
49 /// \private
50 template <>
51 struct Loggable<components::DrawOrder> {
52 static constexpr const char Name[] = "rerun.components.DrawOrder";
53
54 /// Returns the arrow data type this type corresponds to.
55 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
56
57 /// Serializes an array of `rerun::components::DrawOrder` into an arrow array.
59 const components::DrawOrder* instances, size_t num_instances
60 );
61
62 /// Fills an arrow array builder with an array of this type.
63 static rerun::Error fill_arrow_array_builder(
64 arrow::FloatBuilder* builder, const components::DrawOrder* elements, size_t num_elements
65 );
66 };
67} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:89
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:75
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:21
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Component: Draw order used for the display order of 2D elements.
Definition draw_order.hpp:30