Rerun C++ SDK
No Matches
rerun::archetypes::Scalar Struct Reference

Archetype: Log a double-precision scalar. More...

#include <rerun/archetypes/scalar.hpp>

Public Types

using IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName >
 Indicator component, used to identify the archetype when converting to a list of components.

Public Member Functions

 Scalar (Scalar &&other)=default
 Scalar (rerun::components::Scalar _scalar)

Public Attributes

rerun::components::Scalar scalar
 The scalar value to log.

Static Public Attributes

static constexpr const char IndicatorComponentName [] = "rerun.components.ScalarIndicator"

Detailed Description

Archetype: Log a double-precision scalar.

The current timeline value will be used for the time/X-axis, hence scalars cannot be static.

When used to produce a plot, this archetype is used to provide the data that is referenced by the SeriesLine or SeriesPoint archetypes. You can do this by logging both archetypes to the same path, or alternatively configuring the plot-specific archetypes through the blueprint.

See also rerun::archetypes::SeriesPoint, rerun::archetypes::SeriesLine.


Simple line plot


#include <rerun.hpp>
#include <cmath>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_scalar");
// Log the data on a timeline called "step".
for (int step = 0; step <64; ++step) {
rec.set_time_sequence("step", step);
rec.log("scalar", rerun::Scalar(std::sin(static_cast<double>(step) / 10.0)));
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:57
Archetype: Log a double-precision scalar.
Definition scalar.hpp:50

The documentation for this struct was generated from the following file: