Rerun C++ SDK
Loading...
Searching...
No Matches
view_blueprint.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/view_blueprint.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/view_class.hpp"
7#include "../../blueprint/components/view_origin.hpp"
8#include "../../blueprint/components/visible.hpp"
9#include "../../collection.hpp"
10#include "../../compiler_utils.hpp"
11#include "../../component_batch.hpp"
12#include "../../components/name.hpp"
13#include "../../indicator_component.hpp"
14#include "../../result.hpp"
15
16#include <cstdint>
17#include <optional>
18#include <utility>
19#include <vector>
20
21namespace rerun::blueprint::archetypes {
22 /// **Archetype**: The description of a single view.
24 /// The class of the view.
26
27 /// The name of the view.
28 std::optional<rerun::components::Name> display_name;
29
30 /// The "anchor point" of this view.
31 ///
32 /// Defaults to the root path '/' if not specified.
33 ///
34 /// The transform at this path forms the reference point for all scene->world transforms in this view.
35 /// I.e. the position of this entity path in space forms the origin of the coordinate system in this view.
36 /// Furthermore, this is the primary indicator for heuristics on what entities we show in this view.
37 std::optional<rerun::blueprint::components::ViewOrigin> space_origin;
38
39 /// Whether this view is visible.
40 ///
41 /// Defaults to true if not specified.
42 std::optional<rerun::blueprint::components::Visible> visible;
43
44 public:
45 static constexpr const char IndicatorComponentName[] =
46 "rerun.blueprint.components.ViewBlueprintIndicator";
47
48 /// Indicator component, used to identify the archetype when converting to a list of components.
50
51 public:
52 ViewBlueprint() = default;
53 ViewBlueprint(ViewBlueprint&& other) = default;
54
56 : class_identifier(std::move(_class_identifier)) {}
57
58 /// The name of the view.
60 display_name = std::move(_display_name);
61 // See: https://github.com/rerun-io/rerun/issues/4027
62 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
63 }
64
65 /// The "anchor point" of this view.
66 ///
67 /// Defaults to the root path '/' if not specified.
68 ///
69 /// The transform at this path forms the reference point for all scene->world transforms in this view.
70 /// I.e. the position of this entity path in space forms the origin of the coordinate system in this view.
71 /// Furthermore, this is the primary indicator for heuristics on what entities we show in this view.
73 space_origin = std::move(_space_origin);
74 // See: https://github.com/rerun-io/rerun/issues/4027
75 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
76 }
77
78 /// Whether this view is visible.
79 ///
80 /// Defaults to true if not specified.
82 visible = std::move(_visible);
83 // See: https://github.com/rerun-io/rerun/issues/4027
84 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
85 }
86 };
87
88} // namespace rerun::blueprint::archetypes
89
90namespace rerun {
91 /// \private
92 template <typename T>
93 struct AsComponents;
94
95 /// \private
96 template <>
97 struct AsComponents<blueprint::archetypes::ViewBlueprint> {
98 /// Serialize all set component batches.
99 static Result<std::vector<ComponentBatch>> serialize(
101 );
102 };
103} // 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:23
Archetype: The description of a single view.
Definition view_blueprint.hpp:23
std::optional< rerun::blueprint::components::ViewOrigin > space_origin
The "anchor point" of this view.
Definition view_blueprint.hpp:37
ViewBlueprint with_space_origin(rerun::blueprint::components::ViewOrigin _space_origin) &&
The "anchor point" of this view.
Definition view_blueprint.hpp:72
std::optional< rerun::blueprint::components::Visible > visible
Whether this view is visible.
Definition view_blueprint.hpp:42
ViewBlueprint with_visible(rerun::blueprint::components::Visible _visible) &&
Whether this view is visible.
Definition view_blueprint.hpp:81
std::optional< rerun::components::Name > display_name
The name of the view.
Definition view_blueprint.hpp:28
ViewBlueprint with_display_name(rerun::components::Name _display_name) &&
The name of the view.
Definition view_blueprint.hpp:59
rerun::blueprint::components::ViewClass class_identifier
The class of the view.
Definition view_blueprint.hpp:25
Component: The class identifier of view, e.g. "2D", "TextLog", ….
Definition view_class.hpp:17
Component: The origin of a view.
Definition view_origin.hpp:17
Component: Whether the container, view, entity or instance is currently visible.
Definition visible.hpp:15
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
Component: A display name, typically for an entity or a item like a plot series.
Definition name.hpp:17