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/fill_mode.hpp"
13#include "../components/length.hpp"
14#include "../components/radius.hpp"
15#include "../components/rotation_axis_angle.hpp"
16#include "../components/rotation_quat.hpp"
17#include "../components/show_labels.hpp"
18#include "../components/text.hpp"
19#include "../components/translation3d.hpp"
20#include "../result.hpp"
100 std::optional<ComponentBatch>
radii;
144 static constexpr const char ArchetypeName[] =
"rerun.archetypes.Capsules3D";
207 const std::vector<float>&
lengths,
const std::vector<float>&
radii
217 // TODO(andreas): This should not take an std::vector.
219 static Capsules3D from_endpoints_and_radii(
220 const std::vector<encodings::Vec3D>& start_points,
221 const std::vector<encodings::Vec3D>& end_points,
222 const std::vector<float>& radii
246 return std::move(*
this);
252 return std::move(*
this);
263 return std::move(*
this);
273 _rotation_axis_angles,
277 return std::move(*
this);
287 return std::move(*
this);
295 return std::move(*
this);
302 return std::move(*
this);
309 return std::move(*
this);
320 return std::move(*
this);
326 return std::move(*
this);
336 return std::move(*
this);
348 return std::move(*
this);
357 return std::move(*
this);
369 return detail::partition_batches(
391 return detail::partition_batches_of_unit_length({&
lengths,
410 template <
typename T>
415 struct AsComponents<archetypes::Capsules3D> {
417 static Result<Collection<ComponentBatch>> as_batches(
const archetypes::Capsules3D& archetype
419 return detail::collect_batches(
422 &archetype.translations,
423 &archetype.rotation_axis_angles,
424 &archetype.quaternions,
426 &archetype.line_radii,
427 &archetype.fill_mode,
429 &archetype.show_labels,
430 &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
FillMode
Component: How a geometric shape is drawn and colored.
Definition fill_mode.hpp:24
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 capsules; cylinders with hemispherical caps.
Definition capsules3d.hpp:95
std::optional< ComponentBatch > class_ids
Optional class ID for the ellipsoids.
Definition capsules3d.hpp:140
static constexpr auto Descriptor_colors
ComponentDescriptor for the colors field.
Definition capsules3d.hpp:170
std::optional< ComponentBatch > show_labels
Whether the text labels should be shown.
Definition capsules3d.hpp:135
Capsules3D with_translations(const Collection< rerun::components::Translation3D > &_translations) &&
Optional translations of the capsules.
Definition capsules3d.hpp:258
static constexpr auto Descriptor_line_radii
ComponentDescriptor for the line_radii field.
Definition capsules3d.hpp:174
Capsules3D with_many_fill_mode(const Collection< rerun::components::FillMode > &_fill_mode) &&
This method makes it possible to pack multiple fill_mode in a single component batch.
Definition capsules3d.hpp:316
Capsules3D with_fill_mode(const rerun::components::FillMode &_fill_mode) &&
Optionally choose whether the cylinders are drawn with lines or solid.
Definition capsules3d.hpp:306
static constexpr auto Descriptor_labels
ComponentDescriptor for the labels field.
Definition capsules3d.hpp:184
Capsules3D with_rotation_axis_angles(const Collection< rerun::components::RotationAxisAngle > &_rotation_axis_angles) &&
Rotations via axis + angle.
Definition capsules3d.hpp:269
static Capsules3D from_lengths_and_radii(const std::vector< float > &lengths, const std::vector< float > &radii)
Creates a new Capsules3D with the given axis-aligned lengths and radii.
Definition capsules3d.hpp:206
static constexpr auto Descriptor_fill_mode
ComponentDescriptor for the fill_mode field.
Definition capsules3d.hpp:179
static Capsules3D clear_fields()
Clear all the fields of a Capsules3D.
std::optional< ComponentBatch > translations
Optional translations of the capsules.
Definition capsules3d.hpp:105
static constexpr auto Descriptor_show_labels
ComponentDescriptor for the show_labels field.
Definition capsules3d.hpp:188
static constexpr auto Descriptor_class_ids
ComponentDescriptor for the class_ids field.
Definition capsules3d.hpp:193
std::optional< ComponentBatch > lengths
Lengths of the capsules, defined as the distance between the centers of the endcaps.
Definition capsules3d.hpp:97
Capsules3D with_colors(const Collection< rerun::components::Color > &_colors) &&
Optional colors for the capsules.
Definition capsules3d.hpp:293
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition capsules3d.hpp:368
static constexpr auto Descriptor_rotation_axis_angles
ComponentDescriptor for the rotation_axis_angles field.
Definition capsules3d.hpp:160
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition capsules3d.hpp:390
static constexpr auto Descriptor_translations
ComponentDescriptor for the translations field.
Definition capsules3d.hpp:155
std::optional< ComponentBatch > colors
Optional colors for the capsules.
Definition capsules3d.hpp:120
Capsules3D with_lengths(const Collection< rerun::components::Length > &_lengths) &&
Lengths of the capsules, defined as the distance between the centers of the endcaps.
Definition capsules3d.hpp:244
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition capsules3d.hpp:144
Capsules3D with_class_ids(const Collection< rerun::components::ClassId > &_class_ids) &&
Optional class ID for the ellipsoids.
Definition capsules3d.hpp:354
Capsules3D with_show_labels(const rerun::components::ShowLabels &_show_labels) &&
Whether the text labels should be shown.
Definition capsules3d.hpp:333
std::optional< ComponentBatch > quaternions
Rotations via quaternion.
Definition capsules3d.hpp:115
Capsules3D with_radii(const Collection< rerun::components::Radius > &_radii) &&
Radii of the capsules.
Definition capsules3d.hpp:250
std::optional< ComponentBatch > rotation_axis_angles
Rotations via axis + angle.
Definition capsules3d.hpp:110
std::optional< ComponentBatch > fill_mode
Optionally choose whether the cylinders are drawn with lines or solid.
Definition capsules3d.hpp:126
Capsules3D with_quaternions(const Collection< rerun::components::RotationQuat > &_quaternions) &&
Rotations via quaternion.
Definition capsules3d.hpp:283
Capsules3D with_labels(const Collection< rerun::components::Text > &_labels) &&
Optional text labels for the capsules, which will be located at their centers.
Definition capsules3d.hpp:324
std::optional< ComponentBatch > radii
Radii of the capsules.
Definition capsules3d.hpp:100
std::optional< ComponentBatch > line_radii
Optional radii for the lines used when the cylinder is rendered as a wireframe.
Definition capsules3d.hpp:123
static constexpr auto Descriptor_radii
ComponentDescriptor for the radii field.
Definition capsules3d.hpp:151
static constexpr auto Descriptor_quaternions
ComponentDescriptor for the quaternions field.
Definition capsules3d.hpp:165
std::optional< ComponentBatch > labels
Optional text labels for the capsules, which will be located at their centers.
Definition capsules3d.hpp:129
static constexpr auto Descriptor_lengths
ComponentDescriptor for the lengths field.
Definition capsules3d.hpp:147
Capsules3D with_line_radii(const Collection< rerun::components::Radius > &_line_radii) &&
Optional radii for the lines used when the cylinder is rendered as a wireframe.
Definition capsules3d.hpp:299
static Capsules3D update_fields()
Update only some specific fields of a Capsules3D.
Definition capsules3d.hpp:236
Capsules3D 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 capsules3d.hpp:343
Component: Whether the entity's components::Text label is shown.
Definition show_labels.hpp:18