Rerun C++ SDK
Loading...
Searching...
No Matches
force_center.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_center.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**: Tries to move the center of mass of the graph to the origin.
21 struct ForceCenter {
22 /// Whether the center force is enabled.
23 ///
24 /// The center force tries to move the center of mass of the graph towards the origin.
25 std::optional<rerun::blueprint::components::Enabled> enabled;
26
27 /// The strength of the force.
28 std::optional<rerun::blueprint::components::ForceStrength> strength;
29
30 public:
31 static constexpr const char IndicatorComponentName[] =
32 "rerun.blueprint.components.ForceCenterIndicator";
33
34 /// Indicator component, used to identify the archetype when converting to a list of components.
36
37 public:
38 ForceCenter() = default;
39 ForceCenter(ForceCenter&& other) = default;
40
41 /// Whether the center force is enabled.
42 ///
43 /// The center force tries to move the center of mass of the graph towards the origin.
45 enabled = std::move(_enabled);
46 // See: https://github.com/rerun-io/rerun/issues/4027
47 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
48 }
49
50 /// The strength of the force.
52 strength = std::move(_strength);
53 // See: https://github.com/rerun-io/rerun/issues/4027
54 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
55 }
56 };
57
58} // namespace rerun::blueprint::archetypes
59
60namespace rerun {
61 /// \private
62 template <typename T>
63 struct AsComponents;
64
65 /// \private
66 template <>
67 struct AsComponents<blueprint::archetypes::ForceCenter> {
68 /// Serialize all set component batches.
69 static Result<std::vector<ComponentBatch>> serialize(
71 );
72 };
73} // 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: Tries to move the center of mass of the graph to the origin.
Definition force_center.hpp:21
ForceCenter with_strength(rerun::blueprint::components::ForceStrength _strength) &&
The strength of the force.
Definition force_center.hpp:51
std::optional< rerun::blueprint::components::ForceStrength > strength
The strength of the force.
Definition force_center.hpp:28
std::optional< rerun::blueprint::components::Enabled > enabled
Whether the center force is enabled.
Definition force_center.hpp:25
ForceCenter with_enabled(rerun::blueprint::components::Enabled _enabled) &&
Whether the center force is enabled.
Definition force_center.hpp:44
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