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/half_size3d.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"
141 static constexpr const char ArchetypeName[] =
"rerun.archetypes.Ellipsoids3D";
203 const std::vector<encodings::Vec3D>&
centers,
const std::vector<float>& radii
245 return std::move(*
this);
253 return std::move(*
this);
263 _rotation_axis_angles,
267 return std::move(*
this);
278 return std::move(*
this);
286 return std::move(*
this);
293 return std::move(*
this);
300 return std::move(*
this);
311 return std::move(*
this);
317 return std::move(*
this);
327 return std::move(*
this);
339 return std::move(*
this);
348 return std::move(*
this);
360 return detail::partition_batches(
381 return detail::partition_batches_of_unit_length({&
half_sizes,
399 template <
typename T>
404 struct AsComponents<archetypes::Ellipsoids3D> {
406 static Result<Collection<ComponentBatch>> as_batches(
407 const archetypes::Ellipsoids3D& archetype
409 return detail::collect_batches(
410 {&archetype.half_sizes,
412 &archetype.rotation_axis_angles,
413 &archetype.quaternions,
415 &archetype.line_radii,
416 &archetype.fill_mode,
418 &archetype.show_labels,
419 &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 ellipsoids or spheres.
Definition ellipsoids3d.hpp:93
Ellipsoids3D with_half_sizes(const Collection< rerun::components::HalfSize3D > &_half_sizes) &&
For each ellipsoid, half of its size on its three axes.
Definition ellipsoids3d.hpp:241
static constexpr auto Descriptor_quaternions
ComponentDescriptor for the quaternions field.
Definition ellipsoids3d.hpp:159
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition ellipsoids3d.hpp:359
std::optional< ComponentBatch > rotation_axis_angles
Rotations via axis + angle.
Definition ellipsoids3d.hpp:107
static Ellipsoids3D from_centers_and_radii(const std::vector< encodings::Vec3D > ¢ers, const std::vector< float > &radii)
Creates new Ellipsoids3D that are spheres, with half_sizes and centers created from centers and radii...
Ellipsoids3D with_class_ids(const Collection< rerun::components::ClassId > &_class_ids) &&
Optional class ID for the ellipsoids.
Definition ellipsoids3d.hpp:345
std::optional< ComponentBatch > centers
Optional center positions of the ellipsoids.
Definition ellipsoids3d.hpp:102
static constexpr auto Descriptor_line_radii
ComponentDescriptor for the line_radii field.
Definition ellipsoids3d.hpp:168
static constexpr auto Descriptor_rotation_axis_angles
ComponentDescriptor for the rotation_axis_angles field.
Definition ellipsoids3d.hpp:154
static constexpr auto Descriptor_show_labels
ComponentDescriptor for the show_labels field.
Definition ellipsoids3d.hpp:182
static constexpr auto Descriptor_colors
ComponentDescriptor for the colors field.
Definition ellipsoids3d.hpp:164
std::optional< ComponentBatch > labels
Optional text labels for the ellipsoids.
Definition ellipsoids3d.hpp:126
static Ellipsoids3D update_fields()
Update only some specific fields of a Ellipsoids3D.
Definition ellipsoids3d.hpp:231
Ellipsoids3D 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 ellipsoids3d.hpp:307
static constexpr auto Descriptor_labels
ComponentDescriptor for the labels field.
Definition ellipsoids3d.hpp:178
std::optional< ComponentBatch > line_radii
Optional radii for the lines used when the ellipsoid is rendered as a wireframe.
Definition ellipsoids3d.hpp:120
static constexpr auto Descriptor_class_ids
ComponentDescriptor for the class_ids field.
Definition ellipsoids3d.hpp:187
Ellipsoids3D with_rotation_axis_angles(const Collection< rerun::components::RotationAxisAngle > &_rotation_axis_angles) &&
Rotations via axis + angle.
Definition ellipsoids3d.hpp:259
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition ellipsoids3d.hpp:380
static constexpr auto Descriptor_half_sizes
ComponentDescriptor for the half_sizes field.
Definition ellipsoids3d.hpp:144
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition ellipsoids3d.hpp:141
static Ellipsoids3D from_radii(const std::vector< float > &sizes)
Creates new Ellipsoids3D that are spheres, with half_sizes created from radii.
Ellipsoids3D with_show_labels(const rerun::components::ShowLabels &_show_labels) &&
Whether the text labels should be shown.
Definition ellipsoids3d.hpp:324
std::optional< ComponentBatch > half_sizes
For each ellipsoid, half of its size on its three axes.
Definition ellipsoids3d.hpp:97
Ellipsoids3D with_quaternions(const Collection< rerun::components::RotationQuat > &_quaternions) &&
Rotations via quaternion.
Definition ellipsoids3d.hpp:273
std::optional< ComponentBatch > quaternions
Rotations via quaternion.
Definition ellipsoids3d.hpp:112
Ellipsoids3D with_labels(const Collection< rerun::components::Text > &_labels) &&
Optional text labels for the ellipsoids.
Definition ellipsoids3d.hpp:315
Ellipsoids3D with_line_radii(const Collection< rerun::components::Radius > &_line_radii) &&
Optional radii for the lines used when the ellipsoid is rendered as a wireframe.
Definition ellipsoids3d.hpp:290
static Ellipsoids3D from_centers_and_half_sizes(Collection< components::Translation3D > centers, Collection< components::HalfSize3D > half_sizes)
Creates new Ellipsoids3D with centers and half_sizes.
Definition ellipsoids3d.hpp:212
std::optional< ComponentBatch > colors
Optional colors for the ellipsoids.
Definition ellipsoids3d.hpp:117
std::optional< ComponentBatch > class_ids
Optional class ID for the ellipsoids.
Definition ellipsoids3d.hpp:137
Ellipsoids3D with_fill_mode(const rerun::components::FillMode &_fill_mode) &&
Optionally choose whether the ellipsoids are drawn with lines or solid.
Definition ellipsoids3d.hpp:297
Ellipsoids3D with_centers(const Collection< rerun::components::Translation3D > &_centers) &&
Optional center positions of the ellipsoids.
Definition ellipsoids3d.hpp:251
static constexpr auto Descriptor_fill_mode
ComponentDescriptor for the fill_mode field.
Definition ellipsoids3d.hpp:173
static Ellipsoids3D from_half_sizes(Collection< components::HalfSize3D > half_sizes)
Creates new Ellipsoids3D with half_sizes centered around the local origin.
Definition ellipsoids3d.hpp:207
static constexpr auto Descriptor_centers
ComponentDescriptor for the centers field.
Definition ellipsoids3d.hpp:149
std::optional< ComponentBatch > fill_mode
Optionally choose whether the ellipsoids are drawn with lines or solid.
Definition ellipsoids3d.hpp:123
static Ellipsoids3D clear_fields()
Clear all the fields of a Ellipsoids3D.
std::optional< ComponentBatch > show_labels
Whether the text labels should be shown.
Definition ellipsoids3d.hpp:132
Ellipsoids3D 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 ellipsoids3d.hpp:334
Ellipsoids3D with_colors(const Collection< rerun::components::Color > &_colors) &&
Optional colors for the ellipsoids.
Definition ellipsoids3d.hpp:284
Component: Whether the entity's components::Text label is shown.
Definition show_labels.hpp:18