Rerun C++ SDK
Loading...
Searching...
No Matches
disconnected_space.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/archetypes/disconnected_space.fbs".
3
4#pragma once
5
6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/disconnected_space.hpp"
10#include "../indicator_component.hpp"
11#include "../result.hpp"
12
13#include <cstdint>
14#include <utility>
15#include <vector>
16
17RR_PUSH_WARNINGS
18RR_DISABLE_DEPRECATION_WARNING
19
20namespace rerun::archetypes {
21 /// **Archetype**: Spatially disconnect this entity from its parent.
22 ///
23 /// Specifies that the entity path at which this is logged is spatially disconnected from its parent,
24 /// making it impossible to transform the entity path into its parent's space and vice versa.
25 /// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views.
26 /// This is useful for specifying that a subgraph is independent of the rest of the scene.
27 ///
28 /// ## Example
29 ///
30 /// ### Disconnected space
31 /// ![image](https://static.rerun.io/disconnected_space/709041fc304b50c74db773b780e32294fe90c95f/full.png)
32 ///
33 /// ```cpp
34 /// #include <rerun.hpp>
35 ///
36 /// // DisconnectedSpace is deprecated and will be removed in the future.
37 /// RR_DISABLE_DEPRECATION_WARNING
38 ///
39 /// int main() {
40 /// const auto rec = rerun::RecordingStream("rerun_example_disconnected_space");
41 /// rec.spawn().exit_on_failure();
42 ///
43 /// // These two points can be projected into the same space..
44 /// rec.log("world/room1/point", rerun::Points3D({{0.0f, 0.0f, 0.0f}}));
45 /// rec.log("world/room2/point", rerun::Points3D({{1.0f, 1.0f, 1.0f}}));
46 ///
47 /// // ..but this one lives in a completely separate space!
48 /// rec.log("world/wormhole", rerun::DisconnectedSpace(true));
49 /// rec.log("world/wormhole/point", rerun::Points3D({{2.0f, 2.0f, 2.0f}}));
50 /// }
51 /// ```
52 struct [[deprecated("Use [archetypes.Transform3D] with an invalid transform instead"
54 /// Whether the entity path at which this is logged is disconnected from its parent.
56
57 public:
58 static constexpr const char IndicatorComponentName[] =
59 "rerun.components.DisconnectedSpaceIndicator";
60
61 /// Indicator component, used to identify the archetype when converting to a list of components.
63
64 public:
65 DisconnectedSpace() = default;
66 DisconnectedSpace(DisconnectedSpace&& other) = default;
67
69 : disconnected_space(std::move(_disconnected_space)) {}
70 };
71
72} // namespace rerun::archetypes
73
74namespace rerun {
75 /// \private
76 template <typename T>
77 struct AsComponents;
78 RR_PUSH_WARNINGS
79 RR_DISABLE_DEPRECATION_WARNING
80
81 /// \private
82 template <>
83 struct AsComponents<archetypes::DisconnectedSpace> {
84 /// Serialize all set component batches.
85 static Result<std::vector<ComponentBatch>> serialize(
86 const archetypes::DisconnectedSpace& archetype
87 );
88 };
89} // namespace rerun
90
91RR_POP_WARNINGS
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:77
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Archetype: Spatially disconnect this entity from its parent.
Definition disconnected_space.hpp:53
rerun::components::DisconnectedSpace disconnected_space
Whether the entity path at which this is logged is disconnected from its parent.
Definition disconnected_space.hpp:55
Component: Spatially disconnect this entity from its parent.
Definition disconnected_space.hpp:22
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32