6#include "../collection.hpp"
7#include "../component_batch.hpp"
8#include "../component_column.hpp"
9#include "../components/colormap.hpp"
10#include "../components/opacity.hpp"
11#include "../components/rotation_quat.hpp"
12#include "../components/tensor_data.hpp"
13#include "../components/translation3d.hpp"
14#include "../components/value_range.hpp"
15#include "../components/voxel_size.hpp"
16#include "../result.hpp"
94 std::optional<ComponentBatch>
values;
179 RR_DISABLE_MAYBE_UNINITIALIZED_PUSH
185 RR_DISABLE_MAYBE_UNINITIALIZED_POP
198 .value_or_throw()) {}
213 return std::move(*
this);
222 return std::move(*
this);
236 return std::move(*
this);
247 return std::move(*
this);
259 return std::move(*
this);
271 return std::move(*
this);
283 return std::move(*
this);
294 return std::move(*
this);
303 return std::move(*
this);
314 return std::move(*
this);
323 return std::move(*
this);
333 return std::move(*
this);
345 return std::move(*
this);
354 return std::move(*
this);
378 template <
typename T>
383 struct AsComponents<archetypes::
Volume3D> {
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
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 dense 3D scalar field, rendered by ray marching.
Definition volume3d.hpp:90
static Volume3D update_fields()
Update only some specific fields of a Volume3D.
Definition volume3d.hpp:201
Volume3D with_many_opacity(const Collection< rerun::components::Opacity > &_opacity) &&
This method makes it possible to pack multiple opacity in a single component batch.
Definition volume3d.hpp:352
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
static constexpr auto Descriptor_translation
ComponentDescriptor for the translation field.
Definition volume3d.hpp:155
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition volume3d.hpp:143
Volume3D with_voxel_size(const rerun::components::VoxelSize &_voxel_size) &&
The scene-unit dimensions of a single voxel cell.
Definition volume3d.hpp:233
Volume3D with_colormap(const rerun::components::Colormap &_colormap) &&
Colormap applied to the values after mapping them through value_range.
Definition volume3d.hpp:320
static constexpr auto Descriptor_colormap
ComponentDescriptor for the colormap field.
Definition volume3d.hpp:170
std::optional< ComponentBatch > quaternion
Rotation of the volume via quaternion.
Definition volume3d.hpp:120
Volume3D with_many_translation(const Collection< rerun::components::Translation3D > &_translation) &&
This method makes it possible to pack multiple translation in a single component batch.
Definition volume3d.hpp:266
Volume3D with_quaternion(const rerun::components::RotationQuat &_quaternion) &&
Rotation of the volume via quaternion.
Definition volume3d.hpp:280
Volume3D 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 volume3d.hpp:243
std::optional< ComponentBatch > opacity
Overall opacity of the volume.
Definition volume3d.hpp:139
Volume3D with_translation(const rerun::components::Translation3D &_translation) &&
Translation of the minimum corner of voxel [0, 0, 0].
Definition volume3d.hpp:256
static Volume3D clear_fields()
Clear all the fields of a Volume3D.
Volume3D 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 volume3d.hpp:310
Volume3D with_many_quaternion(const Collection< rerun::components::RotationQuat > &_quaternion) &&
This method makes it possible to pack multiple quaternion in a single component batch.
Definition volume3d.hpp:290
std::optional< ComponentBatch > voxel_size
The scene-unit dimensions of a single voxel cell.
Definition volume3d.hpp:104
std::optional< ComponentBatch > values
The scalar value of each voxel, as a 3D tensor with dimensions ordered [z, y, x].
Definition volume3d.hpp:94
static constexpr auto Descriptor_value_range
ComponentDescriptor for the value_range field.
Definition volume3d.hpp:165
std::optional< ComponentBatch > colormap
Colormap applied to the values after mapping them through value_range.
Definition volume3d.hpp:130
Volume3D with_many_colormap(const Collection< rerun::components::Colormap > &_colormap) &&
This method makes it possible to pack multiple colormap in a single component batch.
Definition volume3d.hpp:330
std::optional< ComponentBatch > value_range
How to map values to opacity and color.
Definition volume3d.hpp:125
static constexpr auto Descriptor_values
ComponentDescriptor for the values field.
Definition volume3d.hpp:146
Volume3D with_many_values(const Collection< rerun::components::TensorData > &_values) &&
This method makes it possible to pack multiple values in a single component batch.
Definition volume3d.hpp:220
RR_DISABLE_MAYBE_UNINITIALIZED_PUSH Volume3D(Collection< uint64_t > shape, encodings::TensorBuffer buffer)
New Volume3D from dimensions and tensor buffer.
Definition volume3d.hpp:182
static constexpr auto Descriptor_opacity
ComponentDescriptor for the opacity field.
Definition volume3d.hpp:174
Volume3D with_values(const rerun::components::TensorData &_values) &&
The scalar value of each voxel, as a 3D tensor with dimensions ordered [z, y, x].
Definition volume3d.hpp:211
std::optional< ComponentBatch > translation
Translation of the minimum corner of voxel [0, 0, 0].
Definition volume3d.hpp:112
Volume3D with_opacity(const rerun::components::Opacity &_opacity) &&
Overall opacity of the volume.
Definition volume3d.hpp:343
static constexpr auto Descriptor_quaternion
ComponentDescriptor for the quaternion field.
Definition volume3d.hpp:160
Volume3D with_value_range(const rerun::components::ValueRange &_value_range) &&
How to map values to opacity and color.
Definition volume3d.hpp:300
static constexpr auto Descriptor_voxel_size
ComponentDescriptor for the voxel_size field.
Definition volume3d.hpp:150
Component: Degree of transparency ranging from 0.0 (fully transparent) to 1.0 (fully opaque).
Definition opacity.hpp:17
Component: A 3D rotation expressed as a quaternion.
Definition rotation_quat.hpp:18
Component: An N-dimensional array of numbers.
Definition tensor_data.hpp:22
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
Encoding: The underlying storage for archetypes::Tensor.
Definition tensor_buffer.hpp:98
Encoding: An N-dimensional array of numbers.
Definition tensor_data.hpp:30