6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/class_id.hpp"
10#include "../components/color.hpp"
11#include "../components/draw_order.hpp"
12#include "../components/position2d.hpp"
13#include "../components/radius.hpp"
14#include "../components/show_labels.hpp"
15#include "../components/text.hpp"
16#include "../components/vector2d.hpp"
17#include "../indicator_component.hpp"
18#include "../result.hpp"
57 std::optional<Collection<rerun::components::Position2D>>
origins;
63 std::optional<Collection<rerun::components::Radius>>
radii;
66 std::optional<Collection<rerun::components::Color>>
colors;
72 std::optional<Collection<rerun::components::Text>>
labels;
85 std::optional<Collection<rerun::components::ClassId>>
class_ids;
88 static constexpr const char IndicatorComponentName[] =
"rerun.components.Arrows2DIndicator";
97 arrows.
vectors = std::move(vectors_);
113 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
121 radii = std::move(_radii);
123 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
128 colors = std::move(_colors);
130 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
138 labels = std::move(_labels);
140 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
147 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
156 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
165 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
173 template <
typename T>
178 struct AsComponents<archetypes::Arrows2D> {
180 static Result<std::vector<ComponentBatch>> serialize(
const archetypes::Arrows2D& archetype);
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:77
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Archetype: 2D arrows with optional colors, radii, labels, etc.
Definition arrows2d.hpp:50
std::optional< Collection< rerun::components::Text > > labels
Optional text labels for the arrows.
Definition arrows2d.hpp:72
std::optional< Collection< rerun::components::Position2D > > origins
All the origin (base) positions for each arrow in the batch.
Definition arrows2d.hpp:57
Arrows2D with_radii(Collection< rerun::components::Radius > _radii) &&
Optional radii for the arrows.
Definition arrows2d.hpp:120
static Arrows2D from_vectors(Collection< components::Vector2D > vectors_)
Creates new 2D arrows pointing in the given directions, with a base at the origin (0,...
Definition arrows2d.hpp:95
Arrows2D with_colors(Collection< rerun::components::Color > _colors) &&
Optional colors for the points.
Definition arrows2d.hpp:127
std::optional< rerun::components::DrawOrder > draw_order
An optional floating point value that specifies the 2D drawing order.
Definition arrows2d.hpp:80
std::optional< Collection< rerun::components::ClassId > > class_ids
Optional class Ids for the points.
Definition arrows2d.hpp:85
Arrows2D with_draw_order(rerun::components::DrawOrder _draw_order) &&
An optional floating point value that specifies the 2D drawing order.
Definition arrows2d.hpp:153
std::optional< Collection< rerun::components::Radius > > radii
Optional radii for the arrows.
Definition arrows2d.hpp:63
std::optional< rerun::components::ShowLabels > show_labels
Optional choice of whether the text labels should be shown by default.
Definition arrows2d.hpp:75
Arrows2D with_show_labels(rerun::components::ShowLabels _show_labels) &&
Optional choice of whether the text labels should be shown by default.
Definition arrows2d.hpp:144
std::optional< Collection< rerun::components::Color > > colors
Optional colors for the points.
Definition arrows2d.hpp:66
Arrows2D with_labels(Collection< rerun::components::Text > _labels) &&
Optional text labels for the arrows.
Definition arrows2d.hpp:137
Arrows2D with_origins(Collection< rerun::components::Position2D > _origins) &&
All the origin (base) positions for each arrow in the batch.
Definition arrows2d.hpp:110
Collection< rerun::components::Vector2D > vectors
All the vectors for each arrow in the batch.
Definition arrows2d.hpp:52
Arrows2D with_class_ids(Collection< rerun::components::ClassId > _class_ids) &&
Optional class Ids for the points.
Definition arrows2d.hpp:162
Component: Draw order of 2D elements.
Definition draw_order.hpp:20
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
Component: Whether the entity's components::Text label is shown.
Definition show_labels.hpp:19