6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/scalar.hpp"
11#include "../indicator_component.hpp"
12#include "../result.hpp"
20RR_DISABLE_DEPRECATION_WARNING
87 struct [[deprecated(
"since 0.23.0: Use `Scalars` instead.")]]
Scalar {
89 std::optional<ComponentBatch>
scalar;
92 static constexpr const char IndicatorComponentName[] =
"rerun.components.ScalarIndicator";
97 static constexpr const char ArchetypeName[] =
"rerun.archetypes.Scalar";
112 : scalar(
ComponentBatch::from_loggable(std::move(_scalar), Descriptor_scalar)
113 .value_or_throw()) {}
125 scalar = ComponentBatch::from_loggable(_scalar, Descriptor_scalar).value_or_throw();
126 return std::move(*
this);
134 scalar = ComponentBatch::from_loggable(_scalar, Descriptor_scalar).value_or_throw();
135 return std::move(*
this);
159 template <
typename T>
162 RR_DISABLE_DEPRECATION_WARNING
166 struct AsComponents<archetypes::
Scalar> {
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:76
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:14
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: A double-precision scalar, e.g.
Definition scalar.hpp:87
std::optional< ComponentBatch > scalar
The scalar value to log.
Definition scalar.hpp:89
static Scalar clear_fields()
Clear all the fields of a Scalar.
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
static Scalar update_fields()
Update only some specific fields of a Scalar.
Definition scalar.hpp:116
Scalar with_scalar(const rerun::components::Scalar &_scalar) &&
The scalar value to log.
Definition scalar.hpp:124
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Scalar with_many_scalar(const Collection< rerun::components::Scalar > &_scalar) &&
This method makes it possible to pack multiple scalar in a single component batch.
Definition scalar.hpp:133
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
Component: A scalar value, encoded as a 64-bit floating point.
Definition scalar.hpp:17