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 "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 /// \private
14 template <typename T>
15 class NumericBuilder;
16
17 class Array;
18 class DataType;
19 class UInt8Type;
20 using UInt8Builder = NumericBuilder<UInt8Type>;
21} // namespace arrow
22
23namespace rerun::components {
24 /// **Component**: Policy for aggregation of multiple scalar plot values.
25 ///
26 /// This is used for lines in plots when the X axis distance of individual points goes below a single pixel,
27 /// i.e. a single pixel covers more than one tick worth of data. It can greatly improve performance
28 /// (and readability) in such situations as it prevents overdraw.
29 enum class AggregationPolicy : uint8_t {
30
31 /// No aggregation.
32 Off = 1,
33
34 /// Average all points in the range together.
35 Average = 2,
36
37 /// Keep only the maximum values in the range.
38 Max = 3,
39
40 /// Keep only the minimum values in the range.
41 Min = 4,
42
43 /// Keep both the minimum and maximum values in the range.
44 ///
45 /// This will yield two aggregated points instead of one, effectively creating a vertical line.
46 MinMax = 5,
47
48 /// Find both the minimum and maximum values in the range, then use the average of those.
49 MinMaxAverage = 6,
50 };
51} // namespace rerun::components
52
53namespace rerun {
54 template <typename T>
55 struct Loggable;
56
57 /// \private
58 template <>
59 struct Loggable<components::AggregationPolicy> {
60 static constexpr ComponentDescriptor Descriptor = "rerun.components.AggregationPolicy";
61
62 /// Returns the arrow data type this type corresponds to.
63 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
64
65 /// Serializes an array of `rerun::components::AggregationPolicy` into an arrow array.
66 static Result<std::shared_ptr<arrow::Array>> to_arrow(
67 const components::AggregationPolicy* instances, size_t num_instances
68 );
69
70 /// Fills an arrow array builder with an array of this type.
71 static rerun::Error fill_arrow_array_builder(
72 arrow::UInt8Builder* builder, const components::AggregationPolicy* elements,
73 size_t num_elements
74 );
75 };
76} // 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:80
AggregationPolicy
Component: Policy for aggregation of multiple scalar plot values.
Definition aggregation_policy.hpp:29
@ 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:23