6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/color.hpp"
11#include "../components/colormap.hpp"
12#include "../components/opacity.hpp"
13#include "../components/rotation_axis_angle.hpp"
14#include "../components/rotation_quat.hpp"
15#include "../components/translation3d.hpp"
16#include "../components/value_range.hpp"
17#include "../components/voxel_index.hpp"
18#include "../components/voxel_size.hpp"
19#include "../components/voxel_value.hpp"
20#include "../result.hpp"
147 static constexpr const char ArchetypeName[] =
"rerun.archetypes.VoxelGridMap";
233 return std::move(*
this);
243 return std::move(*
this);
255 return std::move(*
this);
263 return std::move(*
this);
271 return std::move(*
this);
283 return std::move(*
this);
295 return std::move(*
this);
311 return std::move(*
this);
324 return std::move(*
this);
334 return std::move(*
this);
346 return std::move(*
this);
354 return std::move(*
this);
363 return std::move(*
this);
372 return std::move(*
this);
384 return std::move(*
this);
393 return std::move(*
this);
404 return std::move(*
this);
416 return detail::partition_batches(
437 return detail::partition_batches_of_unit_length({&
voxel_indices,
455 template <
typename T>
460 struct AsComponents<archetypes::VoxelGridMap> {
462 static Result<Collection<ComponentBatch>> as_batches(
463 const archetypes::VoxelGridMap& archetype
465 return detail::collect_batches(
466 {&archetype.voxel_indices,
467 &archetype.voxel_size,
470 &archetype.translation,
471 &archetype.rotation_axis_angle,
472 &archetype.quaternion,
474 &archetype.value_range,
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
Colormap
Component: Colormap for mapping scalar values within a given range to a color.
Definition colormap.hpp:28
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 sparse 3D voxel grid map with grid indices and voxel dimensions.
Definition voxel_grid_map.hpp:87
static constexpr auto Descriptor_voxel_size
ComponentDescriptor for the voxel_size field.
Definition voxel_grid_map.hpp:155
VoxelGridMap with_many_colormap(const Collection< rerun::components::Colormap > &_colormap) &&
This method makes it possible to pack multiple colormap in a single component batch.
Definition voxel_grid_map.hpp:400
VoxelGridMap with_many_quaternion(const Collection< rerun::components::RotationQuat > &_quaternion) &&
This method makes it possible to pack multiple quaternion in a single component batch.
Definition voxel_grid_map.hpp:341
VoxelGridMap with_colormap(const rerun::components::Colormap &_colormap) &&
Colormap to use when values are present and explicit colors are not provided.
Definition voxel_grid_map.hpp:390
static constexpr auto Descriptor_translation
ComponentDescriptor for the translation field.
Definition voxel_grid_map.hpp:169
std::optional< ComponentBatch > translation
Translation of the minimum corner of voxel [0, 0, 0].
Definition voxel_grid_map.hpp:113
std::optional< ComponentBatch > value_range
Scalar value range for color-mapping.
Definition voxel_grid_map.hpp:138
std::optional< ComponentBatch > voxel_indices
Indices of the voxels within the grid volume.
Definition voxel_grid_map.hpp:89
VoxelGridMap with_many_rotation_axis_angle(const Collection< rerun::components::RotationAxisAngle > &_rotation_axis_angle) &&
This method makes it possible to pack multiple rotation_axis_angle in a single component batch.
Definition voxel_grid_map.hpp:318
std::optional< ComponentBatch > voxel_size
The scene-unit dimensions of a single voxel cell.
Definition voxel_grid_map.hpp:95
VoxelGridMap with_translation(const rerun::components::Translation3D &_translation) &&
Translation of the minimum corner of voxel [0, 0, 0].
Definition voxel_grid_map.hpp:280
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition voxel_grid_map.hpp:147
VoxelGridMap with_quaternion(const rerun::components::RotationQuat &_quaternion) &&
Rotation of the grid via quaternion.
Definition voxel_grid_map.hpp:331
VoxelGridMap with_colors(const Collection< rerun::components::Color > &_colors) &&
Optional colors for each voxel.
Definition voxel_grid_map.hpp:269
static constexpr auto Descriptor_colormap
ComponentDescriptor for the colormap field.
Definition voxel_grid_map.hpp:194
static constexpr auto Descriptor_values
ComponentDescriptor for the values field.
Definition voxel_grid_map.hpp:160
std::optional< ComponentBatch > rotation_axis_angle
Rotation of the grid via axis + angle.
Definition voxel_grid_map.hpp:122
VoxelGridMap with_voxel_size(const rerun::components::VoxelSize &_voxel_size) &&
The scene-unit dimensions of a single voxel cell.
Definition voxel_grid_map.hpp:240
static constexpr auto Descriptor_quaternion
ComponentDescriptor for the quaternion field.
Definition voxel_grid_map.hpp:179
VoxelGridMap with_values(const Collection< rerun::components::VoxelValue > &_values) &&
Optional scalar occupancy or value data for each voxel.
Definition voxel_grid_map.hpp:261
VoxelGridMap with_rotation_axis_angle(const rerun::components::RotationAxisAngle &_rotation_axis_angle) &&
Rotation of the grid via axis + angle.
Definition voxel_grid_map.hpp:305
VoxelGridMap with_many_translation(const Collection< rerun::components::Translation3D > &_translation) &&
This method makes it possible to pack multiple translation in a single component batch.
Definition voxel_grid_map.hpp:290
std::optional< ComponentBatch > colors
Optional colors for each voxel.
Definition voxel_grid_map.hpp:105
static constexpr auto Descriptor_value_range
ComponentDescriptor for the value_range field.
Definition voxel_grid_map.hpp:189
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition voxel_grid_map.hpp:415
std::optional< ComponentBatch > quaternion
Rotation of the grid via quaternion.
Definition voxel_grid_map.hpp:128
static constexpr auto Descriptor_opacity
ComponentDescriptor for the opacity field.
Definition voxel_grid_map.hpp:184
VoxelGridMap with_many_value_range(const Collection< rerun::components::ValueRange > &_value_range) &&
This method makes it possible to pack multiple value_range in a single component batch.
Definition voxel_grid_map.hpp:379
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition voxel_grid_map.hpp:436
VoxelGridMap with_many_opacity(const Collection< rerun::components::Opacity > &_opacity) &&
This method makes it possible to pack multiple opacity in a single component batch.
Definition voxel_grid_map.hpp:361
std::optional< ComponentBatch > values
Optional scalar occupancy or value data for each voxel.
Definition voxel_grid_map.hpp:100
std::optional< ComponentBatch > opacity
Opacity of the voxels after color or colormap application.
Definition voxel_grid_map.hpp:133
VoxelGridMap with_many_voxel_size(const Collection< rerun::components::VoxelSize > &_voxel_size) &&
This method makes it possible to pack multiple voxel_size in a single component batch.
Definition voxel_grid_map.hpp:250
static constexpr auto Descriptor_rotation_axis_angle
ComponentDescriptor for the rotation_axis_angle field.
Definition voxel_grid_map.hpp:174
std::optional< ComponentBatch > colormap
Colormap to use when values are present and explicit colors are not provided.
Definition voxel_grid_map.hpp:143
VoxelGridMap with_voxel_indices(const Collection< rerun::components::VoxelIndex > &_voxel_indices) &&
Indices of the voxels within the grid volume.
Definition voxel_grid_map.hpp:228
static constexpr auto Descriptor_voxel_indices
ComponentDescriptor for the voxel_indices field.
Definition voxel_grid_map.hpp:150
static constexpr auto Descriptor_colors
ComponentDescriptor for the colors field.
Definition voxel_grid_map.hpp:165
static VoxelGridMap update_fields()
Update only some specific fields of a VoxelGridMap.
Definition voxel_grid_map.hpp:220
VoxelGridMap with_opacity(const rerun::components::Opacity &_opacity) &&
Opacity of the voxels after color or colormap application.
Definition voxel_grid_map.hpp:352
VoxelGridMap with_value_range(const rerun::components::ValueRange &_value_range) &&
Scalar value range for color-mapping.
Definition voxel_grid_map.hpp:369
static VoxelGridMap clear_fields()
Clear all the fields of a VoxelGridMap.
Component: Degree of transparency ranging from 0.0 (fully transparent) to 1.0 (fully opaque).
Definition opacity.hpp:17
Component: 3D rotation represented by a rotation around a given axis.
Definition rotation_axis_angle.hpp:17
Component: A 3D rotation expressed as a quaternion.
Definition rotation_quat.hpp:18
Component: A translation vector in 3D space.
Definition translation3d.hpp:15
Component: Range of expected or valid values, specifying a lower and upper bound.
Definition value_range.hpp:18
Component: The scene-unit dimensions of one voxel in a sparse 3D voxel grid.
Definition voxel_size.hpp:18