6#include "../collection.hpp"
7#include "../component_batch.hpp"
8#include "../component_column.hpp"
9#include "../components/scalar.hpp"
10#include "../indicator_component.hpp"
11#include "../result.hpp"
82 std::optional<ComponentBatch>
scalar;
85 static constexpr const char IndicatorComponentName[] =
"rerun.components.ScalarIndicator";
90 static constexpr const char ArchetypeName[] =
"rerun.archetypes.Scalar";
106 .value_or_throw()) {}
119 return std::move(*
this);
128 return std::move(*
this);
152 template <
typename T>
157 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
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor=rerun::Loggable< T >::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: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:80
std::optional< ComponentBatch > scalar
The scalar value to log.
Definition scalar.hpp:82
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:109
Scalar with_scalar(const rerun::components::Scalar &_scalar) &&
The scalar value to log.
Definition scalar.hpp:117
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition scalar.hpp:90
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:126
static constexpr auto Descriptor_scalar
ComponentDescriptor for the scalar field.
Definition scalar.hpp:93
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