-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Scalar, SeriesLine, and SeriesPoint archetypes with their own visualizers #4875
Changes from 8 commits
11cc4f2
aacd520
9d49bcd
a385c17
2825e1c
3dfd3bb
a1529ac
0916895
8c8ff28
37d89ba
9e40916
1a99f36
20446a4
bc9391b
24967b7
c099d5a
c0acdee
507e716
1824fd5
e3e84d5
a0f20dd
cacd6e2
60530c3
4b7aef9
b5ccb44
697030c
b959504
faafcbe
6bf2f99
c6756b2
7687334
009b153
457842b
2ecadab
4fbb760
edadbb8
ff87c9e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,9 @@ use re_viewer_context::external::re_entity_db::{ | |
EditableAutoValue, EntityProperties, TimeSeriesAggregator, | ||
}; | ||
use re_viewer_context::{ | ||
IdentifiedViewSystem, RecommendedSpaceView, SpaceViewClass, SpaceViewClassRegistryError, | ||
SpaceViewId, SpaceViewSpawnHeuristics, SpaceViewState, SpaceViewSystemExecutionError, | ||
SystemExecutionOutput, ViewQuery, ViewerContext, | ||
IdentifiedViewSystem, IndicatedEntities, RecommendedSpaceView, SpaceViewClass, | ||
SpaceViewClassRegistryError, SpaceViewId, SpaceViewSpawnHeuristics, SpaceViewState, | ||
SpaceViewSystemExecutionError, SystemExecutionOutput, ViewQuery, ViewerContext, | ||
}; | ||
|
||
use crate::line_visualizer_system::SeriesLineSystem; | ||
|
@@ -214,12 +214,22 @@ It can greatly improve performance (and readability) in such situations as it pr | |
re_tracing::profile_function!(); | ||
|
||
// For all following lookups, checking indicators is enough, since we know that this is enough to infer visualizability here. | ||
let Some(indicated_entities) = ctx | ||
.indicated_entities_per_visualizer | ||
.get(&LegacyTimeSeriesSystem::identifier()) | ||
else { | ||
let mut indicated_entities = IndicatedEntities::default(); | ||
|
||
for indicated in [ | ||
LegacyTimeSeriesSystem::identifier(), | ||
SeriesLineSystem::identifier(), | ||
SeriesPointSystem::identifier(), | ||
] | ||
Comment on lines
+219
to
+223
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm if one would only log the new scalar archetype, then this wouldn't spawn a space view. But then again we also don't know what visualizer to activate right now, so I figure this is correct? All a bit confusing with the Legacy one around right now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This actually works because the SeriesLineSystem and SeriesPointSystem both accept Scalar as an indicator. |
||
.iter() | ||
.filter_map(|&system_id| ctx.indicated_entities_per_visualizer.get(&system_id)) | ||
{ | ||
indicated_entities.0.extend(indicated.0.iter().cloned()); | ||
} | ||
|
||
if indicated_entities.0.is_empty() { | ||
return SpaceViewSpawnHeuristics::default(); | ||
}; | ||
} | ||
|
||
// Spawn time series data at the root if there's time series data either | ||
// directly at the root or one of its children. | ||
|
Wumpf marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,11 @@ use re_viewer_context::{ | |
|
||
use crate::{ | ||
overrides::{initial_override_color, lookup_override}, | ||
util::{determine_plot_bounds_and_delta, determine_time_range, points_to_series}, | ||
util::{determine_plot_bounds_and_time_per_pixel, determine_time_range, points_to_series}, | ||
PlotPoint, PlotPointAttrs, PlotSeries, PlotSeriesKind, | ||
}; | ||
|
||
/// The legacy system for rendering [`TimeSeriesScalars`] archetypes. | ||
/// The legacy system for rendering [`TimeSeriesScalar`] archetypes. | ||
#[derive(Default, Debug)] | ||
pub struct LegacyTimeSeriesSystem { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rename the file as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I originally did but it made the git diff much more annoying because it failed to track the move |
||
pub annotation_map: AnnotationMap, | ||
|
@@ -86,7 +86,7 @@ impl LegacyTimeSeriesSystem { | |
let query_caches = ctx.entity_db.query_caches(); | ||
let store = ctx.entity_db.store(); | ||
|
||
let (plot_bounds, plot_value_delta) = determine_plot_bounds_and_delta(ctx, query); | ||
let (plot_bounds, time_per_pixel) = determine_plot_bounds_and_time_per_pixel(ctx, query); | ||
|
||
// TODO(cmc): this should be thread-pooled in case there are a gazillon series in the same plot… | ||
for data_result in query.iter_visible_data_results(Self::identifier()) { | ||
|
@@ -195,7 +195,7 @@ impl LegacyTimeSeriesSystem { | |
// Now convert the `PlotPoints` into `Vec<PlotSeries>` | ||
points_to_series( | ||
data_result, | ||
plot_value_delta, | ||
time_per_pixel, | ||
points, | ||
store, | ||
query, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just moving all the aggregation pieces out of visualizer_system.