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