Rerun C++ SDK
Loading...
Searching...
No Matches
force_many_body.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_many_body.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/enabled.hpp"
7#include "../../blueprint/components/force_strength.hpp"
8#include "../../collection.hpp"
9#include "../../compiler_utils.hpp"
10#include "../../component_batch.hpp"
11#include "../../indicator_component.hpp"
12#include "../../result.hpp"
13
14#include <cstdint>
15#include <optional>
16#include <utility>
17#include <vector>
18
19namespace rerun::blueprint::archetypes {
20 /// **Archetype**: A force between each pair of nodes that ressembles an electrical charge.
21 ///
22 /// If `strength` is smaller than 0, it pushes nodes apart, if it is larger than 0 it pulls them together.
24 /// Whether the many body force is enabled.
25 ///
26 /// The many body force is applied on each pair of nodes in a way that ressembles an electrical charge. If the
27 /// strength is smaller than 0, it pushes nodes apart; if it is larger than 0, it pulls them together.
28 std::optional<rerun::blueprint::components::Enabled> enabled;
29
30 /// The strength of the force.
31 ///
32 /// If `strength` is smaller than 0, it pushes nodes apart, if it is larger than 0 it pulls them together.
33 std::optional<rerun::blueprint::components::ForceStrength> strength;
34
35 public:
36 static constexpr const char IndicatorComponentName[] =
37 "rerun.blueprint.components.ForceManyBodyIndicator";
38
39 /// Indicator component, used to identify the archetype when converting to a list of components.
41
42 public:
43 ForceManyBody() = default;
44 ForceManyBody(ForceManyBody&& other) = default;
45
46 /// Whether the many body force is enabled.
47 ///
48 /// The many body force is applied on each pair of nodes in a way that ressembles an electrical charge. If the
49 /// strength is smaller than 0, it pushes nodes apart; if it is larger than 0, it pulls them together.
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 strength of the force.
57 ///
58 /// If `strength` is smaller than 0, it pushes nodes apart, if it is larger than 0 it pulls them together.
60 strength = std::move(_strength);
61 // See: https://github.com/rerun-io/rerun/issues/4027
62 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
63 }
64 };
65
66} // namespace rerun::blueprint::archetypes
67
68namespace rerun {
69 /// \private
70 template <typename T>
71 struct AsComponents;
72
73 /// \private
74 template <>
75 struct AsComponents<blueprint::archetypes::ForceManyBody> {
76 /// Serialize all set component batches.
77 static Result<std::vector<ComponentBatch>> serialize(
79 );
80 };
81} // 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: A force between each pair of nodes that ressembles an electrical charge.
Definition force_many_body.hpp:23
ForceManyBody with_enabled(rerun::blueprint::components::Enabled _enabled) &&
Whether the many body force is enabled.
Definition force_many_body.hpp:50
std::optional< rerun::blueprint::components::ForceStrength > strength
The strength of the force.
Definition force_many_body.hpp:33
std::optional< rerun::blueprint::components::Enabled > enabled
Whether the many body force is enabled.
Definition force_many_body.hpp:28
ForceManyBody with_strength(rerun::blueprint::components::ForceStrength _strength) &&
The strength of the force.
Definition force_many_body.hpp:59
Component: Whether a procedure is enabled.
Definition enabled.hpp:15
Component: The strength of a given force.
Definition force_strength.hpp:17
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32