Rerun C++ SDK
Loading...
Searching...
No Matches
force_link.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/force_link.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/enabled.hpp"
7#include "../../blueprint/components/force_distance.hpp"
8#include "../../blueprint/components/force_iterations.hpp"
9#include "../../collection.hpp"
10#include "../../compiler_utils.hpp"
11#include "../../component_batch.hpp"
12#include "../../indicator_component.hpp"
13#include "../../result.hpp"
14
15#include <cstdint>
16#include <optional>
17#include <utility>
18#include <vector>
19
20namespace rerun::blueprint::archetypes {
21 /// **Archetype**: Aims to achieve a target distance between two nodes that are connected by an edge.
22 struct ForceLink {
23 /// Whether the link force is enabled.
24 ///
25 /// The link force aims to achieve a target distance between two nodes that are connected by one ore more edges.
26 std::optional<rerun::blueprint::components::Enabled> enabled;
27
28 /// The target distance between two nodes.
29 std::optional<rerun::blueprint::components::ForceDistance> distance;
30
31 /// Specifies how often this force should be applied per iteration.
32 ///
33 /// Increasing this parameter can lead to better results at the cost of longer computation time.
34 std::optional<rerun::blueprint::components::ForceIterations> iterations;
35
36 public:
37 static constexpr const char IndicatorComponentName[] =
38 "rerun.blueprint.components.ForceLinkIndicator";
39
40 /// Indicator component, used to identify the archetype when converting to a list of components.
42
43 public:
44 ForceLink() = default;
45 ForceLink(ForceLink&& other) = default;
46
47 /// Whether the link force is enabled.
48 ///
49 /// The link force aims to achieve a target distance between two nodes that are connected by one ore more edges.
51 enabled = std::move(_enabled);
52 // See: https://github.com/rerun-io/rerun/issues/4027
53 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
54 }
55
56 /// The target distance between two nodes.
58 distance = std::move(_distance);
59 // See: https://github.com/rerun-io/rerun/issues/4027
60 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
61 }
62
63 /// Specifies how often this force should be applied per iteration.
64 ///
65 /// Increasing this parameter can lead to better results at the cost of longer computation time.
67 iterations = std::move(_iterations);
68 // See: https://github.com/rerun-io/rerun/issues/4027
69 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
70 }
71 };
72
73} // namespace rerun::blueprint::archetypes
74
75namespace rerun {
76 /// \private
77 template <typename T>
78 struct AsComponents;
79
80 /// \private
81 template <>
82 struct AsComponents<blueprint::archetypes::ForceLink> {
83 /// Serialize all set component batches.
84 static Result<std::vector<ComponentBatch>> serialize(
86 );
87 };
88} // 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
Component: Whether a procedure is enabled.
Definition enabled.hpp:15
Component: The target distance between two nodes.
Definition force_distance.hpp:17
Component: Specifies how often this force should be applied per iteration.
Definition force_iterations.hpp:17
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32