|
Rerun C++ SDK
|
Archetype: A state change, representing a transition of an entity into a new state. More...
#include <rerun/archetypes/state_change.hpp>
Public Member Functions | |
| StateChange (StateChange &&other)=default | |
| StateChange (const StateChange &other)=default | |
| StateChange & | operator= (const StateChange &other)=default |
| StateChange & | operator= (StateChange &&other)=default |
| StateChange | with_state (const rerun::components::Text &_state) && |
The new state value. A null state is ignored, it can be used to partially update a multi-instance state array. | |
| StateChange | with_many_state (const Collection< rerun::components::Text > &_state) && |
This method makes it possible to pack multiple state in a single component batch. | |
| 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 StateChange | update_fields () |
Update only some specific fields of a StateChange. | |
| static StateChange | clear_fields () |
Clear all the fields of a StateChange. | |
Public Attributes | |
| std::optional< ComponentBatch > | state |
The new state value. A null state is ignored, it can be used to partially update a multi-instance state array. | |
Static Public Attributes | |
| static constexpr const char | ArchetypeName [] = "rerun.archetypes.StateChange" |
The name of the archetype as used in ComponentDescriptors. | |
| static constexpr auto | Descriptor_state |
ComponentDescriptor for the state field. | |
Archetype: A state change, representing a transition of an entity into a new state.
Useful for representing discrete state machines, mode transitions, or state changes over time. Each logged archetypes::StateChange marks a new state at the given time. A null state is ignored by the state timeline view.
The state timeline view displays these as horizontal colored lanes over time.

⚠ This type is unstable and may change significantly in a way that the data won't be backwards compatible.
|
inline |
This method makes it possible to pack multiple state in a single component batch.
This only makes sense when used in conjunction with columns. with_state should be used when logging a single row's worth of data.
| Collection< ComponentColumn > rerun::archetypes::StateChange::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::StateChange::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.
|
staticconstexpr |
ComponentDescriptor for the state field.