|
Rerun C++ SDK
|
Archetype: Define the style and mapping for state values in a state timeline view. More...
#include <rerun/archetypes/state_configuration.hpp>
Public Member Functions | |
| StateConfiguration (StateConfiguration &&other)=default | |
| StateConfiguration (const StateConfiguration &other)=default | |
| StateConfiguration & | operator= (const StateConfiguration &other)=default |
| StateConfiguration & | operator= (StateConfiguration &&other)=default |
| StateConfiguration | with_values (const Collection< rerun::components::Text > &_values) && |
| The raw state values that this configuration applies to. | |
| StateConfiguration | with_labels (const Collection< rerun::components::Text > &_labels) && |
| Display labels for each state value. | |
| StateConfiguration | with_colors (const Collection< rerun::components::Color > &_colors) && |
| Colors for each state value. | |
| StateConfiguration | with_visible (const Collection< rerun::components::Visible > &_visible) && |
| Visibility for each state value. | |
| Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
| Partitions the component data into multiple sub-batches. | |
| Collection< ComponentColumn > | columns () |
| Partitions the component data into unit-length sub-batches. | |
Static Public Member Functions | |
| static StateConfiguration | update_fields () |
Update only some specific fields of a StateConfiguration. | |
| static StateConfiguration | clear_fields () |
Clear all the fields of a StateConfiguration. | |
Public Attributes | |
| std::optional< ComponentBatch > | values |
| The raw state values that this configuration applies to. | |
| std::optional< ComponentBatch > | labels |
| Display labels for each state value. | |
| std::optional< ComponentBatch > | colors |
| Colors for each state value. | |
| std::optional< ComponentBatch > | visible |
| Visibility for each state value. | |
Static Public Attributes | |
| static constexpr const char | ArchetypeName [] = "rerun.archetypes.StateConfiguration" |
The name of the archetype as used in ComponentDescriptors. | |
| static constexpr auto | Descriptor_values |
ComponentDescriptor for the values field. | |
| static constexpr auto | Descriptor_labels |
ComponentDescriptor for the labels field. | |
| static constexpr auto | Descriptor_colors |
ComponentDescriptor for the colors field. | |
| static constexpr auto | Descriptor_visible |
ComponentDescriptor for the visible field. | |
Archetype: Define the style and mapping for state values in a state timeline view.
This archetype provides configuration for how state values are displayed. It maps raw state values to display labels, colors, and visibility.
values, labels, colors, and visible are parallel arrays: the entry at index i of each describes the same state value, and only the per-index pairing is meaningful. The four arrays should have matching length; any secondary array (labels, colors, visible) that is shorter than values falls back to defaults for the missing entries.
It's generally recommended to log this type as static.
The underlying data needs to be logged to the same entity path using archetypes::StateChange.
⚠ This type is unstable and may change significantly in a way that the data won't be backwards compatible.
|
inline |
The raw state values that this configuration applies to.
Each entry defines a known state value. The order determines the mapping to labels, colors, and visible (by index).
|
inline |
Display labels for each state value.
If provided, the label at index i is shown instead of the raw value at index i. If not provided or shorter than values, the raw value is used as the label.
|
inline |
Colors for each state value.
If provided, the color at index i is used for the state at index i. If not provided, colors are assigned automatically from a built-in palette.
|
inline |
Visibility for each state value.
If provided, the visibility at index i controls whether the state at index i is shown. If not provided, all state values are visible.
| Collection< ComponentColumn > rerun::archetypes::StateConfiguration::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.
This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
The specified lengths must sum to the total length of the component batch.
| Collection< ComponentColumn > rerun::archetypes::StateConfiguration::columns | ( | ) |
Partitions the component data into unit-length sub-batches.
This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.
| std::optional<ComponentBatch> rerun::archetypes::StateConfiguration::values |
The raw state values that this configuration applies to.
Each entry defines a known state value. The order determines the mapping to labels, colors, and visible (by index).
| std::optional<ComponentBatch> rerun::archetypes::StateConfiguration::labels |
Display labels for each state value.
If provided, the label at index i is shown instead of the raw value at index i. If not provided or shorter than values, the raw value is used as the label.
| std::optional<ComponentBatch> rerun::archetypes::StateConfiguration::colors |
Colors for each state value.
If provided, the color at index i is used for the state at index i. If not provided, colors are assigned automatically from a built-in palette.
| std::optional<ComponentBatch> rerun::archetypes::StateConfiguration::visible |
Visibility for each state value.
If provided, the visibility at index i controls whether the state at index i is shown. If not provided, all state values are visible.
|
staticconstexpr |
ComponentDescriptor for the values field.
|
staticconstexpr |
ComponentDescriptor for the labels field.
|
staticconstexpr |
ComponentDescriptor for the colors field.
|
staticconstexpr |
ComponentDescriptor for the visible field.