Skip to content

Commit 2efda9f

Browse files
committed
do not ever teach user to use log_component_batches
1 parent ddb58ad commit 2efda9f

File tree

5 files changed

+11
-26
lines changed

5 files changed

+11
-26
lines changed

docs/snippets/all/archetypes/image_send_columns.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
2323

2424
// Log the ImageFormat and indicator once, as static.
2525
let format = rerun::components::ImageFormat::rgb8([width as _, height as _]);
26-
rec.log_component_batches(
27-
"images",
28-
true,
29-
[&format as _, &rerun::Image::indicator() as _],
30-
)?;
26+
rec.log_static("images", &[&format as _, &rerun::Image::indicator() as _])?;
3127

3228
// Split up the image data into several components referencing the underlying data.
3329
let image_size_in_bytes = width * height * 3;

docs/snippets/all/archetypes/manual_indicator.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
77

88
// Specify both a Mesh3D and a Points3D indicator component so that the data is shown as both a
99
// 3D mesh _and_ a point cloud by default.
10-
rec.log_component_batches(
10+
rec.log(
1111
"points_and_mesh",
12-
false,
13-
[
12+
&[
1413
rerun::Points3D::indicator().as_ref() as &dyn rerun::ComponentBatch,
1514
rerun::Mesh3D::indicator().as_ref(),
1615
&[[0.0, 0.0, 0.0], [10.0, 0.0, 0.0], [0.0, 10.0, 0.0]].map(rerun::Position3D::from),

docs/snippets/all/archetypes/mesh3d_partial_updates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
2626
(glam::Vec3::from(vertex_positions[1]) * factor).into(),
2727
(glam::Vec3::from(vertex_positions[2]) * factor).into(),
2828
];
29-
rec.log_component_batches("triangle", false, [&vertex_positions as _])?;
29+
rec.log("triangle", &[&vertex_positions as _])?;
3030
}
3131

3232
Ok(())

docs/snippets/all/concepts/different_data_per_timeline.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
1111
// Log a red color on one timeline.
1212
rec.reset_time(); // Clears all set timeline info.
1313
rec.set_time_seconds("red timeline", 1.0);
14-
rec.log_component_batches(
14+
rec.log(
1515
"points",
16-
false,
17-
[&rerun::components::Color::from_u32(0xFF0000FF) as &dyn rerun::ComponentBatch],
16+
&[&rerun::components::Color::from_u32(0xFF0000FF) as &dyn rerun::ComponentBatch],
1817
)?;
1918

2019
// And a blue color on the other.
2120
rec.reset_time(); // Clears all set timeline info.
2221
rec.set_time_sequence("blue timeline", 1);
23-
rec.log_component_batches(
22+
rec.log(
2423
"points",
25-
false,
26-
[&rerun::components::Color::from_u32(0x0000FFFF) as &dyn rerun::ComponentBatch],
24+
&[&rerun::components::Color::from_u32(0x0000FFFF) as &dyn rerun::ComponentBatch],
2725
)?;
2826

2927
// TODO(#5521): log VisualBounds2D

examples/rust/incremental_logging/src/main.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let radii = [rerun::Radius(0.1); 10];
3838
3939
// Only log colors and radii once.
4040
rec.set_time_sequence("frame_nr", 0);
41-
rec.log_component_batches("points", false /* static */, [&colors as &dyn rerun::ComponentBatch, &radii])?;
41+
rec.log("points", &[&colors as &dyn rerun::ComponentBatch, &radii])?;
4242
4343
let mut rng = rand::thread_rng();
4444
let dist = Uniform::new(-5., 5.);
@@ -63,17 +63,9 @@ fn run(rec: &rerun::RecordingStream) -> anyhow::Result<()> {
6363

6464
// Only log colors and radii once.
6565
rec.set_time_sequence("frame_nr", 0);
66-
rec.log_component_batches(
67-
"points",
68-
false, /* static */
69-
[&colors as &dyn rerun::ComponentBatch, &radii],
70-
)?;
66+
rec.log("points", &[&colors as &dyn rerun::ComponentBatch, &radii])?;
7167
// Logging statically would also work.
72-
// rec.log_component_batches(
73-
// "points",
74-
// true, /* static */
75-
// [&colors as &dyn rerun::ComponentBatch, &radii],
76-
// )?;
68+
// rec.log_static("points", &[&colors as &dyn rerun::ComponentBatch, &radii])?;
7769

7870
let mut rng = rand::thread_rng();
7971
let dist = Uniform::new(-5., 5.);

0 commit comments

Comments
 (0)