6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/cell_size.hpp"
11#include "../components/colormap.hpp"
12#include "../components/draw_order.hpp"
13#include "../components/image_buffer.hpp"
14#include "../components/image_format.hpp"
15#include "../components/opacity.hpp"
16#include "../components/rotation_axis_angle.hpp"
17#include "../components/rotation_quat.hpp"
18#include "../components/translation3d.hpp"
19#include "../result.hpp"
83 std::optional<ComponentBatch>
data;
86 std::optional<ComponentBatch>
format;
195 return std::move(*
this);
204 return std::move(*
this);
210 return std::move(*
this);
219 return std::move(*
this);
228 return std::move(*
this);
238 return std::move(*
this);
250 return std::move(*
this);
262 return std::move(*
this);
278 return std::move(*
this);
291 return std::move(*
this);
301 return std::move(*
this);
312 return std::move(*
this);
320 return std::move(*
this);
329 return std::move(*
this);
338 return std::move(*
this);
349 return std::move(*
this);
359 return std::move(*
this);
369 return std::move(*
this);
381 return detail::partition_batches(
401 return detail::partition_batches_of_unit_length({&
data,
418 template <
typename T>
423 struct AsComponents<archetypes::GridMap> {
425 static Result<Collection<ComponentBatch>> as_batches(
const archetypes::GridMap& archetype) {
426 return detail::collect_batches(
429 &archetype.cell_size,
430 &archetype.translation,
431 &archetype.rotation_axis_angle,
432 &archetype.quaternion,
434 &archetype.draw_order,
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
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 2D grid map stored as raster data in an image buffer, with a cell size in scene units an...
Definition grid_map.hpp:81
GridMap 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 grid_map.hpp:285
GridMap with_translation(const rerun::components::Translation3D &_translation) &&
Translation of the lower-left corner of the grid map in space.
Definition grid_map.hpp:247
std::optional< ComponentBatch > quaternion
Rotation of the lower-left corner of the grid map in space via quaternion.
Definition grid_map.hpp:114
static constexpr auto Descriptor_rotation_axis_angle
ComponentDescriptor for the rotation_axis_angle field.
Definition grid_map.hpp:154
std::optional< ComponentBatch > rotation_axis_angle
Rotation of the lower-left corner of the grid map in space via axis + angle.
Definition grid_map.hpp:108
static GridMap update_fields()
Update only some specific fields of a GridMap.
Definition grid_map.hpp:185
GridMap with_many_colormap(const Collection< rerun::components::Colormap > &_colormap) &&
This method makes it possible to pack multiple colormap in a single component batch.
Definition grid_map.hpp:366
GridMap with_many_quaternion(const Collection< rerun::components::RotationQuat > &_quaternion) &&
This method makes it possible to pack multiple quaternion in a single component batch.
Definition grid_map.hpp:308
std::optional< ComponentBatch > cell_size
The scene unit size of a single grid cell (e.g.
Definition grid_map.hpp:91
GridMap with_many_translation(const Collection< rerun::components::Translation3D > &_translation) &&
This method makes it possible to pack multiple translation in a single component batch.
Definition grid_map.hpp:257
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition grid_map.hpp:134
std::optional< ComponentBatch > colormap
Colormap to use for rendering single-channel grid maps.
Definition grid_map.hpp:130
static constexpr auto Descriptor_translation
ComponentDescriptor for the translation field.
Definition grid_map.hpp:149
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition grid_map.hpp:400
GridMap with_many_opacity(const Collection< rerun::components::Opacity > &_opacity) &&
This method makes it possible to pack multiple opacity in a single component batch.
Definition grid_map.hpp:327
std::optional< ComponentBatch > format
The format of the grid's image data.
Definition grid_map.hpp:86
GridMap with_quaternion(const rerun::components::RotationQuat &_quaternion) &&
Rotation of the lower-left corner of the grid map in space via quaternion.
Definition grid_map.hpp:298
std::optional< ComponentBatch > translation
Translation of the lower-left corner of the grid map in space.
Definition grid_map.hpp:99
GridMap with_many_cell_size(const Collection< rerun::components::CellSize > &_cell_size) &&
This method makes it possible to pack multiple cell_size in a single component batch.
Definition grid_map.hpp:235
GridMap with_many_format(const Collection< rerun::components::ImageFormat > &_format) &&
This method makes it possible to pack multiple format in a single component batch.
Definition grid_map.hpp:217
static constexpr auto Descriptor_format
ComponentDescriptor for the format field.
Definition grid_map.hpp:141
std::optional< ComponentBatch > opacity
Opacity of the grid map texture after all image decoding and colormap application.
Definition grid_map.hpp:119
GridMap with_draw_order(const rerun::components::DrawOrder &_draw_order) &&
Optional draw order for layering multiple grid maps that overlap in space.
Definition grid_map.hpp:335
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition grid_map.hpp:380
GridMap with_colormap(const rerun::components::Colormap &_colormap) &&
Colormap to use for rendering single-channel grid maps.
Definition grid_map.hpp:356
static constexpr auto Descriptor_quaternion
ComponentDescriptor for the quaternion field.
Definition grid_map.hpp:159
static constexpr auto Descriptor_draw_order
ComponentDescriptor for the draw_order field.
Definition grid_map.hpp:168
GridMap with_many_data(const Collection< rerun::components::ImageBuffer > &_data) &&
This method makes it possible to pack multiple data in a single component batch.
Definition grid_map.hpp:202
GridMap with_rotation_axis_angle(const rerun::components::RotationAxisAngle &_rotation_axis_angle) &&
Rotation of the lower-left corner of the grid map in space via axis + angle.
Definition grid_map.hpp:272
GridMap with_many_draw_order(const Collection< rerun::components::DrawOrder > &_draw_order) &&
This method makes it possible to pack multiple draw_order in a single component batch.
Definition grid_map.hpp:345
std::optional< ComponentBatch > data
The raw grid data.
Definition grid_map.hpp:83
GridMap with_format(const rerun::components::ImageFormat &_format) &&
The format of the grid's image data.
Definition grid_map.hpp:208
GridMap with_data(const rerun::components::ImageBuffer &_data) &&
The raw grid data.
Definition grid_map.hpp:193
static constexpr auto Descriptor_opacity
ComponentDescriptor for the opacity field.
Definition grid_map.hpp:164
static GridMap clear_fields()
Clear all the fields of a GridMap.
std::optional< ComponentBatch > draw_order
Optional draw order for layering multiple grid maps that overlap in space.
Definition grid_map.hpp:124
GridMap with_opacity(const rerun::components::Opacity &_opacity) &&
Opacity of the grid map texture after all image decoding and colormap application.
Definition grid_map.hpp:318
static constexpr auto Descriptor_colormap
ComponentDescriptor for the colormap field.
Definition grid_map.hpp:173
static constexpr auto Descriptor_data
ComponentDescriptor for the data field.
Definition grid_map.hpp:137
static constexpr auto Descriptor_cell_size
ComponentDescriptor for the cell_size field.
Definition grid_map.hpp:145
GridMap with_cell_size(const rerun::components::CellSize &_cell_size) &&
The scene unit size of a single grid cell (e.g.
Definition grid_map.hpp:225
Component: The metric size of one grid cell in local scene units.
Definition cell_size.hpp:16
Component: Draw order of 2D elements.
Definition draw_order.hpp:30
Component: A buffer that is known to store image data.
Definition image_buffer.hpp:18
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