Rerun C++ SDK
Loading...
Searching...
No Matches
disconnected_space.hpp
1// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/re_types/definitions/rerun/archetypes/disconnected_space.fbs".
3
4#pragma once
5
6#include "../collection.hpp"
7#include "../components/disconnected_space.hpp"
8#include "../data_cell.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**: Specifies that the entity path at which this is logged is disconnected from its parent.
18 ///
19 /// This is useful for specifying that a subgraph is independent of the rest of the scene.
20 ///
21 /// If a transform or pinhole is logged on the same path, this archetype's components
22 /// will be ignored.
23 ///
24 /// ## Example
25 ///
26 /// ### Disconnected Space
27 /// ![image](https://static.rerun.io/disconnected_space/b8f95b0e32359de625a765247c84935146c1fba9/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 rerun::components::DisconnectedSpace disconnected_space;
47
48 public:
49 static constexpr const char IndicatorComponentName[] =
50 "rerun.components.DisconnectedSpaceIndicator";
51
52 /// Indicator component, used to identify the archetype when converting to a list of components.
54
55 public:
56 DisconnectedSpace() = default;
57 DisconnectedSpace(DisconnectedSpace&& other) = default;
58
60 : disconnected_space(std::move(_disconnected_space)) {}
61
62 /// Returns the number of primary instances of this archetype.
63 size_t num_instances() const {
64 return 1;
65 }
66 };
67
68} // namespace rerun::archetypes
69
70namespace rerun {
71 /// \private
72 template <typename T>
73 struct AsComponents;
74
75 /// \private
76 template <>
77 struct AsComponents<archetypes::DisconnectedSpace> {
78 /// Serialize all set component batches.
79 static Result<std::vector<DataCell>> serialize(
80 const archetypes::DisconnectedSpace& archetype
81 );
82 };
83} // namespace rerun
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:66
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Archetype: Specifies that the entity path at which this is logged is disconnected from its parent.
Definition disconnected_space.hpp:45
size_t num_instances() const
Returns the number of primary instances of this archetype.
Definition disconnected_space.hpp:63
Component: Specifies that the entity path at which this is logged is disconnected from its parent.
Definition disconnected_space.hpp:23
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:23