Rerun C++ SDK
Loading...
Searching...
No Matches
force_collision_radius.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_collision_radius.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/enabled.hpp"
7#include "../../blueprint/components/force_iterations.hpp"
8#include "../../blueprint/components/force_strength.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**: Resolves collisions between the bounding circles, according to the radius of the nodes.
23 /// Whether the collision force is enabled.
24 ///
25 /// The collision force resolves collisions between nodes based on the bounding circle defined by their radius.
26 std::optional<rerun::blueprint::components::Enabled> enabled;
27
28 /// The strength of the force.
29 std::optional<rerun::blueprint::components::ForceStrength> strength;
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.ForceCollisionRadiusIndicator";
39
40 /// Indicator component, used to identify the archetype when converting to a list of components.
42
43 public:
44 ForceCollisionRadius() = default;
46
47 /// Whether the collision force is enabled.
48 ///
49 /// The collision force resolves collisions between nodes based on the bounding circle defined by their radius.
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.
58 ) && {
59 strength = std::move(_strength);
60 // See: https://github.com/rerun-io/rerun/issues/4027
61 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
62 }
63
64 /// Specifies how often this force should be applied per iteration.
65 ///
66 /// Increasing this parameter can lead to better results at the cost of longer computation time.
69 ) && {
70 iterations = std::move(_iterations);
71 // See: https://github.com/rerun-io/rerun/issues/4027
72 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);)
73 }
74 };
75
76} // namespace rerun::blueprint::archetypes
77
78namespace rerun {
79 /// \private
80 template <typename T>
81 struct AsComponents;
82
83 /// \private
84 template <>
85 struct AsComponents<blueprint::archetypes::ForceCollisionRadius> {
86 /// Serialize all set component batches.
87 static Result<std::vector<ComponentBatch>> serialize(
89 );
90 };
91} // 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: Resolves collisions between the bounding circles, according to the radius of the nodes.
Definition force_collision_radius.hpp:22
ForceCollisionRadius with_strength(rerun::blueprint::components::ForceStrength _strength) &&
The strength of the force.
Definition force_collision_radius.hpp:57
std::optional< rerun::blueprint::components::Enabled > enabled
Whether the collision force is enabled.
Definition force_collision_radius.hpp:26
std::optional< rerun::blueprint::components::ForceStrength > strength
The strength of the force.
Definition force_collision_radius.hpp:29
ForceCollisionRadius with_enabled(rerun::blueprint::components::Enabled _enabled) &&
Whether the collision force is enabled.
Definition force_collision_radius.hpp:50
ForceCollisionRadius with_iterations(rerun::blueprint::components::ForceIterations _iterations) &&
Specifies how often this force should be applied per iteration.
Definition force_collision_radius.hpp:67
std::optional< rerun::blueprint::components::ForceIterations > iterations
Specifies how often this force should be applied per iteration.
Definition force_collision_radius.hpp:34
Component: Whether a procedure is enabled.
Definition enabled.hpp:15
Component: Specifies how often this force should be applied per iteration.
Definition force_iterations.hpp:17
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