Rerun C++ SDK
Loading...
Searching...
No Matches
scalar_axis.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/blueprint/archetypes/scalar_axis.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/lock_range_during_zoom.hpp"
7#include "../../collection.hpp"
8#include "../../compiler_utils.hpp"
9#include "../../component_batch.hpp"
10#include "../../components/range1d.hpp"
11#include "../../indicator_component.hpp"
12#include "../../result.hpp"
13
14#include <cstdint>
15#include <optional>
16#include <utility>
17#include <vector>
18
19namespace rerun::blueprint::archetypes {
20 /// **Archetype**: Configuration for the scalar axis of a plot.
21 struct ScalarAxis {
22 /// The range of the axis.
23 ///
24 /// If unset, the range well be automatically determined based on the queried data.
25 std::optional<rerun::components::Range1D> range;
26
27 /// If enabled, the Y axis range will remain locked to the specified range when zooming.
28 std::optional<rerun::blueprint::components::LockRangeDuringZoom> zoom_lock;
29
30 public:
31 static constexpr const char IndicatorComponentName[] =
32 "rerun.blueprint.components.ScalarAxisIndicator";
33
34 /// Indicator component, used to identify the archetype when converting to a list of components.
36
37 public:
38 ScalarAxis() = default;
39 ScalarAxis(ScalarAxis&& other) = default;
40
41 /// The range of the axis.
42 ///
43 /// If unset, the range well be automatically determined based on the queried data.
45 range = std::move(_range);
46 // See: https://github.com/rerun-io/rerun/issues/4027
47 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
48 }
49
50 /// If enabled, the Y axis range will remain locked to the specified range when zooming.
52 zoom_lock = std::move(_zoom_lock);
53 // See: https://github.com/rerun-io/rerun/issues/4027
54 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
55 }
56 };
57
58} // namespace rerun::blueprint::archetypes
59
60namespace rerun {
61 /// \private
62 template <typename T>
63 struct AsComponents;
64
65 /// \private
66 template <>
67 struct AsComponents<blueprint::archetypes::ScalarAxis> {
68 /// Serialize all set component batches.
69 static Result<std::vector<ComponentBatch>> serialize(
71 );
72 };
73} // namespace rerun
A class for representing either a usable value, or an error.
Definition result.hpp:14
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Archetype: Configuration for the scalar axis of a plot.
Definition scalar_axis.hpp:21
std::optional< rerun::blueprint::components::LockRangeDuringZoom > zoom_lock
If enabled, the Y axis range will remain locked to the specified range when zooming.
Definition scalar_axis.hpp:28
ScalarAxis with_zoom_lock(rerun::blueprint::components::LockRangeDuringZoom _zoom_lock) &&
If enabled, the Y axis range will remain locked to the specified range when zooming.
Definition scalar_axis.hpp:51
ScalarAxis with_range(rerun::components::Range1D _range) &&
The range of the axis.
Definition scalar_axis.hpp:44
std::optional< rerun::components::Range1D > range
The range of the axis.
Definition scalar_axis.hpp:25
Component: Indicate whether the range should be locked when zooming in on the data.
Definition lock_range_during_zoom.hpp:16
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30
Component: A 1D range, specifying a lower and upper bound.
Definition range1d.hpp:15