re_viewport 0.16.0

The central viewport panel of the Rerun viewer.
Documentation
use re_viewer_context::ViewerContext;

use re_space_view::SpaceViewBlueprint;

/// List out all space views we generate by default for the available data.
///
/// TODO(andreas): This is transitional. We want to pass on the space view spawn heuristics
/// directly and make more high level decisions with it.
pub fn default_created_space_views(ctx: &ViewerContext<'_>) -> Vec<SpaceViewBlueprint> {
    re_tracing::profile_function!();

    ctx.space_view_class_registry
        .iter_registry()
        .flat_map(|entry| {
            let spawn_heuristics = entry.class.spawn_heuristics(ctx);
            spawn_heuristics
                .into_vec()
                .into_iter()
                .map(|recommendation| SpaceViewBlueprint::new(entry.identifier, recommendation))
        })
        .collect()
}