Skip to content

Commit

Permalink
migration guide & cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jan 27, 2025
1 parent 016f14b commit f78acd5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
16 changes: 16 additions & 0 deletions docs/content/reference/migration/migration-0-22.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,19 @@ Instead, there's now methods with the same name, i.e. `ViewCoordinates::RUB()`.
As part of the switch to "eager archetype serialization" (serialization of archetype components now occurs at time of archetype instantiation rather than logging), we can no longer offer exposing the `Tensor` **archetype** as `ndarray::ArrayView` directly.

However, it is still possible to do so with the `TensorData` component.

### C++ `RecordingStream::send_column` no longer takes raw component collections

Previously, `RecordingStream::send_column` accepted raw component collections.

This is no longer the case and only `rerun::ComponentColumn` and anything else from from which
a `Collection<ComponentColumn>` can be constructed is accepted.
The preferred way to create `rerun::ComponentColumn`s is to use the new `columns` method on archetypes.

For instance in order to send a column of scalars, you can now do this.
```cpp
rec.send_columns("scalars", time_column,
rerun::Scalar().with_many_scalar(scalar_data).columns()
);
```
All [example snippets](https://rerun.io/docs/snippets/all) have been updated accordingly.
6 changes: 2 additions & 4 deletions docs/snippets/all/archetypes/points3d_send_columns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ int main() {
auto time_column = rerun::TimeColumn::from_times("time", std::move(times));

// Partition our data as expected across the 5 timesteps.
auto position =
rerun::Points3D::update_fields().with_positions(positions).columns({2, 4, 4, 3, 4});
auto color_and_radius =
rerun::Points3D::update_fields().with_colors(colors).with_radii(radii).columns();
auto position = rerun::Points3D().with_positions(positions).columns({2, 4, 4, 3, 4});
auto color_and_radius = rerun::Points3D().with_colors(colors).with_radii(radii).columns();

rec.send_columns("points", time_column, position, color_and_radius);
}
2 changes: 1 addition & 1 deletion rerun_cpp/src/rerun/recording_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ namespace rerun {
return try_send_columns(
entity_path,
std::move(time_columns),
// Need to create collection explicitely, otherwise this becomes a recursive call.
// Need to create collection explicitly, otherwise this becomes a recursive call.
Collection<ComponentColumn>(std::move(flat_column_list))
);
}
Expand Down

0 comments on commit f78acd5

Please sign in to comment.