-
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 ImagePlaneDistance Component #6505
Conversation
Deployed docs
|
733cff7
to
cc8fc7d
Compare
585eebf
to
c1578dc
Compare
cc8fc7d
to
7c938a6
Compare
c1578dc
to
39cb672
Compare
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.
Looks good to me, with the caveat that lots of details are still beyond my grasp.
let visualizer_collection = ctx | ||
.space_view_class_registry | ||
.new_visualizer_collection(space_view.class_identifier()); | ||
|
||
let Some(view_state) = view_states | ||
.get(*space_view_id) | ||
.map(|states| states.view_state.as_ref()) | ||
else { | ||
return; | ||
}; | ||
|
||
let view_ctx = ViewContext { | ||
viewer_ctx: ctx, | ||
view_state, | ||
visualizer_collection: &visualizer_collection, | ||
}; |
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.
A helper would be nice.
let visualizer_collection = ctx | |
.space_view_class_registry | |
.new_visualizer_collection(space_view.class_identifier()); | |
let Some(view_state) = view_states | |
.get(*space_view_id) | |
.map(|states| states.view_state.as_ref()) | |
else { | |
return; | |
}; | |
let view_ctx = ViewContext { | |
viewer_ctx: ctx, | |
view_state, | |
visualizer_collection: &visualizer_collection, | |
}; | |
if let Some(view_ctx) = ctx.as_view_context() else { | |
return; | |
}; |
edit: I saw elsewhere that you are constructing it slightly differently, so this may not make much sense
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.
I'm going to come back and do this one on top of the next PR in this stack once I know the different variants of how it needs to get built.
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.
makes sense 👍🏻
crates/re_types/definitions/rerun/components/image_plane_distance.fbs
Outdated
Show resolved
Hide resolved
### What - Builds on top of: #6505 (merge that first and rebase) This replaces the axes-related entity properties with a new Axes3D archetype. The archetype allows overriding the axis-length from code. Controlling whether the axes are visible now happens via enabling of the visualizer. We use similar heuristics to before to enable axes3d visualizers on transforms in certain situations. The legacy UI has been remapped to the new indicator/heuristics implementation. ![image](https://github.com/rerun-io/rerun/assets/3312232/e24bbe52-5470-41e1-ada6-79d0d8059cef) TODO: - [] Still need to implement the example in rust / cpp. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6510?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6510?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/6510) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
What
This introduces a new
ViewContext
that holds onto the state so that we don't need to continuously pass it around everywhere. Additionally, introduces some new helpers to make querying with overrides and fallbacks easier.We are accumulating more information in the HybridDataResults so that we can now find a fallback provider and resolve fallbacks.
Specifically this makes it possible to now use the DataResult to directly produce a HybridLatestAtResults, which in turn allows you to make calls like
get_mono_with_fallback()
.For better or for worse, this will eat all manner of promise/deser errors along the way and just get you a data value you can use.
Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.