Skip to content

Commit

Permalink
log_timeless -> log_static
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Mar 15, 2024
1 parent f820d49 commit a43f291
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/code-examples/all/annotation_context_connections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main() {
// Log an annotation context to assign a label and color to each class
// Create a class description with labels and color for each keypoint ID as well as some
// connections between keypoints.
rec.log_timeless(
rec.log_static(
"/",
rerun::AnnotationContext({rerun::ClassDescription{
0,
Expand Down
2 changes: 1 addition & 1 deletion docs/code-examples/all/annotation_context_rects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int main() {
rec.spawn().exit_on_failure();

// Log an annotation context to assign a label and color to each class
rec.log_timeless(
rec.log_static(
"/",
rerun::AnnotationContext({
rerun::AnnotationInfo(1, "red", rerun::Rgba32(255, 0, 0)),
Expand Down
2 changes: 1 addition & 1 deletion docs/code-examples/all/annotation_context_segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ int main() {
rec.spawn().exit_on_failure();

// create an annotation context to describe the classes
rec.log_timeless(
rec.log_static(
"segmentation",
rerun::AnnotationContext({
rerun::AnnotationInfo(1, "red", rerun::Rgba32(255, 0, 0)),
Expand Down
2 changes: 1 addition & 1 deletion docs/code-examples/all/asset3d_out_of_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int main(int argc, char** argv) {
const auto rec = rerun::RecordingStream("rerun_example_asset3d_out_of_tree");
rec.spawn().exit_on_failure();

rec.log_timeless("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP); // Set an up-axis
rec.log_static("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP); // Set an up-axis

rec.set_time_sequence("frame", 0);
rec.log("world/asset", rerun::Asset3D::from_file(path).value_or_throw());
Expand Down
2 changes: 1 addition & 1 deletion docs/code-examples/all/asset3d_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ int main(int argc, char* argv[]) {
const auto rec = rerun::RecordingStream("rerun_example_asset3d");
rec.spawn().exit_on_failure();

rec.log_timeless("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP); // Set an up-axis
rec.log_static("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP); // Set an up-axis
rec.log("world/asset", rerun::Asset3D::from_file(path).value_or_throw());
}
8 changes: 4 additions & 4 deletions docs/code-examples/all/scalar_multiple_plots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ int main() {
int64_t lcg_state = 0;

// Set up plot styling:
// They are logged timeless as they don't change over time and apply to all timelines.
// They are logged static as they don't change over time and apply to all timelines.
// Log two lines series under a shared root so that they show in the same plot by default.
rec.log_timeless(
rec.log_static(
"trig/sin",
rerun::SeriesLine().with_color({255, 0, 0}).with_name("sin(0.01t)")
);
rec.log_timeless(
rec.log_static(
"trig/cos",
rerun::SeriesLine().with_color({0, 255, 0}).with_name("cos(0.01t)")
);
// Log scattered points under a different root so that they show in a different plot by default.
rec.log_timeless("scatter/lcg", rerun::SeriesPoint());
rec.log_static("scatter/lcg", rerun::SeriesPoint());

// Log the data on a timeline called "step".
for (int t = 0; t < static_cast<int>(TAU * 2.0 * 100.0); ++t) {
Expand Down
2 changes: 1 addition & 1 deletion docs/code-examples/all/segmentation_image_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main() {
}

// create an annotation context to describe the classes
rec.log_timeless(
rec.log_static(
"/",
rerun::AnnotationContext({
rerun::AnnotationInfo(1, "red", rerun::Rgba32(255, 0, 0)),
Expand Down
6 changes: 3 additions & 3 deletions docs/code-examples/all/series_line_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ int main() {
rec.spawn().exit_on_failure();

// Set up plot styling:
// They are logged timeless as they don't change over time and apply to all timelines.
// They are logged static as they don't change over time and apply to all timelines.
// Log two lines series under a shared root so that they show in the same plot by default.
rec.log_timeless(
rec.log_static(
"trig/sin",
rerun::SeriesLine().with_color({255, 0, 0}).with_name("sin(0.01t)").with_width(2)
);
rec.log_timeless(
rec.log_static(
"trig/cos",
rerun::SeriesLine().with_color({0, 255, 0}).with_name("cos(0.01t)").with_width(4)
);
Expand Down
6 changes: 3 additions & 3 deletions docs/code-examples/all/series_point_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ int main() {
rec.spawn().exit_on_failure();

// Set up plot styling:
// They are logged timeless as they don't change over time and apply to all timelines.
// They are logged static as they don't change over time and apply to all timelines.
// Log two point series under a shared root so that they show in the same plot by default.
rec.log_timeless(
rec.log_static(
"trig/sin",
rerun::SeriesPoint()
.with_color({255, 0, 0})
.with_name("sin(0.01t)")
.with_marker(rerun::components::MarkerShape::Circle)
.with_marker_size(4)
);
rec.log_timeless(
rec.log_static(
"trig/cos",
rerun::SeriesPoint()
.with_color({0, 255, 0})
Expand Down
2 changes: 1 addition & 1 deletion docs/code-examples/all/view_coordinates_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ int main() {
const auto rec = rerun::RecordingStream("rerun_example_view_coordinates");
rec.spawn().exit_on_failure();

rec.log_timeless("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP); // Set an up-axis
rec.log_static("world", rerun::ViewCoordinates::RIGHT_HAND_Z_UP); // Set an up-axis
rec.log(
"world/xyz",
rerun::Arrows3D::from_vectors({{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}
Expand Down
4 changes: 2 additions & 2 deletions examples/cpp/clock/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ int main() {
const auto rec = rerun::RecordingStream("rerun_example_clock");
rec.spawn().exit_on_failure();

rec.log_timeless("world", rerun::ViewCoordinates::RIGHT_HAND_Y_UP);
rec.log_timeless("world/frame", rerun::Boxes3D::from_half_sizes({{LENGTH_S, LENGTH_S, 1.0f}}));
rec.log_static("world", rerun::ViewCoordinates::RIGHT_HAND_Y_UP);
rec.log_static("world/frame", rerun::Boxes3D::from_half_sizes({{LENGTH_S, LENGTH_S, 1.0f}}));

for (int step = 0; step < num_steps; step++) {
log_hand(rec, "seconds", seconds(step), (step % 60) / 60.0f, LENGTH_S, WIDTH_S, 0);
Expand Down
7 changes: 4 additions & 3 deletions examples/cpp/external_data_loader/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ file with Rerun (`rerun file.cpp`).
("application-id", "Optional recommended ID for the application", cxxopts::value<std::string>())
("recording-id", "Optional recommended ID for the recording", cxxopts::value<std::string>())
("entity-path-prefix", "Optional prefix for all entity paths", cxxopts::value<std::string>())
("timeless", "Optionally mark data to be logged as timeless", cxxopts::value<bool>()->default_value("false"))
("timeless", "Deprecated: alias for `--static`", cxxopts::value<bool>()->default_value("false"))
("static", "Optionally mark data to be logged as static", cxxopts::value<bool>()->default_value("false"))
("time", "Optional timestamps to log at (e.g. `--time sim_time=1709203426`) (repeatable)", cxxopts::value<std::vector<std::string>>())
("sequence", "Optional sequences to log at (e.g. `--sequence sim_frame=42`) (repeatable)", cxxopts::value<std::vector<std::string>>())
;
Expand Down Expand Up @@ -118,9 +119,9 @@ file with Rerun (`rerun file.cpp`).
if (args.count("entity-path-prefix")) {
entity_path = args["entity-path-prefix"].as<std::string>() + "/" + filepath;
}
rec.log_with_timeless(
rec.log_with_static(
entity_path,
args["timeless"].as<bool>(),
args["static"].as<bool>() || args["timeless"].as<bool>(),
rerun::TextDocument(text).with_media_type(rerun::MediaType::markdown())
);
}
6 changes: 3 additions & 3 deletions examples/cpp/incremental_logging/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int main() {
const auto rec = rerun::RecordingStream("rerun_example_incremental_logging");
rec.spawn().exit_on_failure();

rec.log_timeless(
rec.log_static(
"readme",
rerun::TextDocument(README).with_media_type(rerun::components::MediaType::markdown())
);
Expand All @@ -56,8 +56,8 @@ int main() {
// Only log colors and radii once.
rec.set_time_sequence("frame_nr", 0);
rec.log("points", colors, radii);
// Logging timelessly with `RecordingStream::log_timeless` would also work.
// rec.log_timeless("points", colors, radii);
// Logging statically with `RecordingStream::log_static` would also work.
// rec.log_static("points", colors, radii);

std::default_random_engine gen;
std::uniform_real_distribution<float> dist_pos(-5.0f, 5.0f);
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/roundtrips/view_coordinates/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
int main(int, char** argv) {
const auto rec = rerun::RecordingStream("rerun_example_roundtrip_view_coordinates");
rec.save(argv[1]).exit_on_failure();
rec.log_timeless("/", rerun::archetypes::ViewCoordinates::RDF);
rec.log_static("/", rerun::archetypes::ViewCoordinates::RDF);
}

0 comments on commit a43f291

Please sign in to comment.