6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/class_id.hpp"
11#include "../components/color.hpp"
12#include "../components/position3d.hpp"
13#include "../components/radius.hpp"
14#include "../components/show_labels.hpp"
15#include "../components/text.hpp"
16#include "../components/vector3d.hpp"
17#include "../result.hpp"
80 std::optional<ComponentBatch>
radii;
83 std::optional<ComponentBatch>
colors;
89 std::optional<ComponentBatch>
labels;
164 return std::move(*
this);
172 return std::move(*
this);
181 return std::move(*
this);
187 return std::move(*
this);
196 return std::move(*
this);
206 return std::move(*
this);
217 return std::move(*
this);
226 return std::move(*
this);
238 return detail::partition_batches(
250 return detail::partition_batches_of_unit_length(
261 template <
typename T>
266 struct AsComponents<archetypes::Arrows3D> {
268 static Result<Collection<ComponentBatch>> as_batches(
const archetypes::Arrows3D& archetype
270 return detail::collect_batches(
276 &archetype.show_labels,
277 &archetype.class_ids}
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:90
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: 3D arrows with optional colors, radii, labels, etc.
Definition arrows3d.hpp:67
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition arrows3d.hpp:237
static constexpr auto Descriptor_radii
ComponentDescriptor for the radii field.
Definition arrows3d.hpp:116
Arrows3D with_labels(const Collection< rerun::components::Text > &_labels) &&
Optional text labels for the arrows.
Definition arrows3d.hpp:194
Arrows3D with_origins(const Collection< rerun::components::Position3D > &_origins) &&
All the origin (base) positions for each arrow in the batch.
Definition arrows3d.hpp:170
static constexpr auto Descriptor_colors
ComponentDescriptor for the colors field.
Definition arrows3d.hpp:120
Arrows3D with_show_labels(const rerun::components::ShowLabels &_show_labels) &&
Whether the text labels should be shown.
Definition arrows3d.hpp:203
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition arrows3d.hpp:104
Arrows3D with_class_ids(const Collection< rerun::components::ClassId > &_class_ids) &&
Optional class Ids for the points.
Definition arrows3d.hpp:223
static constexpr auto Descriptor_show_labels
ComponentDescriptor for the show_labels field.
Definition arrows3d.hpp:128
std::optional< ComponentBatch > labels
Optional text labels for the arrows.
Definition arrows3d.hpp:89
std::optional< ComponentBatch > radii
Optional radii for the arrows.
Definition arrows3d.hpp:80
static Arrows3D update_fields()
Update only some specific fields of a Arrows3D.
Definition arrows3d.hpp:154
Arrows3D with_vectors(const Collection< rerun::components::Vector3D > &_vectors) &&
All the vectors for each arrow in the batch.
Definition arrows3d.hpp:162
static Arrows3D from_vectors(Collection< components::Vector3D > vectors_)
Creates new 3D arrows pointing in the given directions, with a base at the origin (0,...
Definition arrows3d.hpp:140
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition arrows3d.hpp:249
std::optional< ComponentBatch > class_ids
Optional class Ids for the points.
Definition arrows3d.hpp:100
std::optional< ComponentBatch > origins
All the origin (base) positions for each arrow in the batch.
Definition arrows3d.hpp:74
Arrows3D with_many_show_labels(const Collection< rerun::components::ShowLabels > &_show_labels) &&
This method makes it possible to pack multiple show_labels in a single component batch.
Definition arrows3d.hpp:213
Arrows3D with_radii(const Collection< rerun::components::Radius > &_radii) &&
Optional radii for the arrows.
Definition arrows3d.hpp:179
static constexpr auto Descriptor_vectors
ComponentDescriptor for the vectors field.
Definition arrows3d.hpp:107
static constexpr auto Descriptor_labels
ComponentDescriptor for the labels field.
Definition arrows3d.hpp:124
static constexpr auto Descriptor_class_ids
ComponentDescriptor for the class_ids field.
Definition arrows3d.hpp:133
std::optional< ComponentBatch > show_labels
Whether the text labels should be shown.
Definition arrows3d.hpp:95
static constexpr auto Descriptor_origins
ComponentDescriptor for the origins field.
Definition arrows3d.hpp:111
static Arrows3D clear_fields()
Clear all the fields of a Arrows3D.
std::optional< ComponentBatch > colors
Optional colors for the points.
Definition arrows3d.hpp:83
std::optional< ComponentBatch > vectors
All the vectors for each arrow in the batch.
Definition arrows3d.hpp:69
Arrows3D with_colors(const Collection< rerun::components::Color > &_colors) &&
Optional colors for the points.
Definition arrows3d.hpp:185
Component: Whether the entity's components::Text label is shown.
Definition show_labels.hpp:18