Rerun C++ SDK
Loading...
Searching...
No Matches
aggregation_policy.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/components/aggregation_policy.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 UInt8Type;
19 using UInt8Builder = NumericBuilder<UInt8Type>;
20} // namespace arrow
21
22namespace rerun::components {
23 /// **Component**: Policy for aggregation of multiple scalar plot values.
24 ///
25 /// This is used for lines in plots when the X axis distance of individual points goes below a single pixel,
26 /// i.e. a single pixel covers more than one tick worth of data. It can greatly improve performance
27 /// (and readability) in such situations as it prevents overdraw.
28 enum class AggregationPolicy : uint8_t {
29
30 /// No aggregation.
31 Off = 1,
32
33 /// Average all points in the range together.
34 Average = 2,
35
36 /// Keep only the maximum values in the range.
37 Max = 3,
38
39 /// Keep only the minimum values in the range.
40 Min = 4,
41
42 /// Keep both the minimum and maximum values in the range.
43 ///
44 /// This will yield two aggregated points instead of one, effectively creating a vertical line.
45 MinMax = 5,
46
47 /// Find both the minimum and maximum values in the range, then use the average of those.
48 MinMaxAverage = 6,
49 };
50} // namespace rerun::components
51
52namespace rerun {
53 template <typename T>
54 struct Loggable;
55
56 /// \private
57 template <>
58 struct Loggable<components::AggregationPolicy> {
59 static constexpr const char Name[] = "rerun.components.AggregationPolicy";
60
61 /// Returns the arrow data type this type corresponds to.
62 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
63
64 /// Serializes an array of `rerun::components::AggregationPolicy` into an arrow array.
65 static Result<std::shared_ptr<arrow::Array>> to_arrow(
66 const components::AggregationPolicy* instances, size_t num_instances
67 );
68
69 /// Fills an arrow array builder with an array of this type.
70 static rerun::Error fill_arrow_array_builder(
71 arrow::UInt8Builder* builder, const components::AggregationPolicy* elements,
72 size_t num_elements
73 );
74 };
75} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:79
AggregationPolicy
Component: Policy for aggregation of multiple scalar plot values.
Definition aggregation_policy.hpp:28
@ MinMaxAverage
Find both the minimum and maximum values in the range, then use the average of those.
@ Max
Keep only the maximum values in the range.
@ Min
Keep only the minimum values in the range.
@ Average
Average all points in the range together.
@ MinMax
Keep both the minimum and maximum values in the range.
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22