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/keypoint_id.hpp"
13#include "../components/point_shading.hpp"
14#include "../components/position3d.hpp"
15#include "../components/radius.hpp"
16#include "../components/show_labels.hpp"
17#include "../components/text.hpp"
18#include "../result.hpp"
206 std::optional<ComponentBatch>
radii;
296 .value_or_throw()) {}
310 return std::move(*
this);
316 return std::move(*
this);
325 return std::move(*
this);
334 return std::move(*
this);
344 return std::move(*
this);
355 return std::move(*
this);
364 return std::move(*
this);
376 return std::move(*
this);
385 return std::move(*
this);
400 return std::move(*
this);
412 return detail::partition_batches(
431 return detail::partition_batches_of_unit_length({&
positions,
447 template <
typename T>
452 struct AsComponents<archetypes::Points3D> {
454 static Result<Collection<ComponentBatch>> as_batches(
const archetypes::Points3D& archetype
456 return detail::collect_batches(
457 {&archetype.positions,
461 &archetype.show_labels,
462 &archetype.point_shading,
463 &archetype.class_ids,
464 &archetype.keypoint_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
PointShading
Component: Defines how points are shaded.
Definition point_shading.hpp:24
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
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: A 3D point cloud with positions and optional colors, radii, labels, etc.
Definition points3d.hpp:201
static constexpr auto Descriptor_class_ids
ComponentDescriptor for the class_ids field.
Definition points3d.hpp:278
Points3D with_many_point_shading(const Collection< rerun::components::PointShading > &_point_shading) &&
This method makes it possible to pack multiple point_shading in a single component batch.
Definition points3d.hpp:371
std::optional< ComponentBatch > class_ids
Optional class Ids for the points.
Definition points3d.hpp:234
std::optional< ComponentBatch > keypoint_ids
Optional keypoint IDs for the points, identifying them within a class.
Definition points3d.hpp:244
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition points3d.hpp:430
std::optional< ComponentBatch > positions
All the 3D positions at which the point cloud shows points.
Definition points3d.hpp:203
static constexpr auto Descriptor_radii
ComponentDescriptor for the radii field.
Definition points3d.hpp:256
static constexpr auto Descriptor_colors
ComponentDescriptor for the colors field.
Definition points3d.hpp:260
Points3D with_labels(const Collection< rerun::components::Text > &_labels) &&
Optional text labels for the points.
Definition points3d.hpp:332
Points3D with_positions(const Collection< rerun::components::Position3D > &_positions) &&
All the 3D positions at which the point cloud shows points.
Definition points3d.hpp:307
Points3D with_point_shading(const rerun::components::PointShading &_point_shading) &&
How points should be shaded.
Definition points3d.hpp:361
Points3D 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 points3d.hpp:351
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition points3d.hpp:411
static constexpr auto Descriptor_labels
ComponentDescriptor for the labels field.
Definition points3d.hpp:264
std::optional< ComponentBatch > point_shading
How points should be shaded.
Definition points3d.hpp:229
Points3D with_radii(const Collection< rerun::components::Radius > &_radii) &&
Optional radii for the points, effectively turning them into circles.
Definition points3d.hpp:314
static constexpr auto Descriptor_point_shading
ComponentDescriptor for the point_shading field.
Definition points3d.hpp:273
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition points3d.hpp:248
static Points3D clear_fields()
Clear all the fields of a Points3D.
Points3D with_show_labels(const rerun::components::ShowLabels &_show_labels) &&
Whether the text labels should be shown.
Definition points3d.hpp:341
static constexpr auto Descriptor_positions
ComponentDescriptor for the positions field.
Definition points3d.hpp:251
std::optional< ComponentBatch > labels
Optional text labels for the points.
Definition points3d.hpp:218
static constexpr auto Descriptor_show_labels
ComponentDescriptor for the show_labels field.
Definition points3d.hpp:268
std::optional< ComponentBatch > radii
Optional radii for the points, effectively turning them into circles.
Definition points3d.hpp:206
static Points3D update_fields()
Update only some specific fields of a Points3D.
Definition points3d.hpp:299
std::optional< ComponentBatch > show_labels
Whether the text labels should be shown.
Definition points3d.hpp:224
Points3D with_colors(const Collection< rerun::components::Color > &_colors) &&
Optional colors for the points.
Definition points3d.hpp:323
Points3D with_class_ids(const Collection< rerun::components::ClassId > &_class_ids) &&
Optional class Ids for the points.
Definition points3d.hpp:382
std::optional< ComponentBatch > colors
Optional colors for the points.
Definition points3d.hpp:212
static constexpr auto Descriptor_keypoint_ids
ComponentDescriptor for the keypoint_ids field.
Definition points3d.hpp:282
Points3D with_keypoint_ids(const Collection< rerun::components::KeypointId > &_keypoint_ids) &&
Optional keypoint IDs for the points, identifying them within a class.
Definition points3d.hpp:396
Component: Whether the entity's components::Text label is shown.
Definition show_labels.hpp:18