Rerun C++ SDK
Loading...
Searching...
No Matches
background.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/background.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/background_kind.hpp"
7#include "../../collection.hpp"
8#include "../../compiler_utils.hpp"
9#include "../../component_batch.hpp"
10#include "../../components/color.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 background of a view.
21 struct Background {
22 /// The type of the background.
23 rerun::blueprint::components::BackgroundKind kind;
24
25 /// Color used for the `SolidColor` background type.
26 std::optional<rerun::components::Color> color;
27
28 public:
29 static constexpr const char IndicatorComponentName[] =
30 "rerun.blueprint.components.BackgroundIndicator";
31
32 /// Indicator component, used to identify the archetype when converting to a list of components.
34
35 public:
36 Background() = default;
37 Background(Background&& other) = default;
38
39 explicit Background(rerun::blueprint::components::BackgroundKind _kind)
40 : kind(std::move(_kind)) {}
41
42 /// Color used for the `SolidColor` background type.
44 color = std::move(_color);
45 // See: https://github.com/rerun-io/rerun/issues/4027
46 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
47 }
48 };
49
50} // namespace rerun::blueprint::archetypes
51
52namespace rerun {
53 /// \private
54 template <typename T>
55 struct AsComponents;
56
57 /// \private
58 template <>
59 struct AsComponents<blueprint::archetypes::Background> {
60 /// Serialize all set component batches.
61 static Result<std::vector<ComponentBatch>> serialize(
63 );
64 };
65} // 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 background of a view.
Definition background.hpp:21
rerun::blueprint::components::BackgroundKind kind
The type of the background.
Definition background.hpp:23
Background with_color(rerun::components::Color _color) &&
Color used for the SolidColor background type.
Definition background.hpp:43
std::optional< rerun::components::Color > color
Color used for the SolidColor background type.
Definition background.hpp:26
Component: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
Definition color.hpp:17
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:30