Skip to content
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

Make Pinhole archetype in Rust eager serialized #8789

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jan 23, 2025

Related

What

Deprecates a bunch of methods on Pinhole, all of them still functional though through ad-hoc deserialization utilities.

In the Viewer (concrete, re_spatial_view) we don't use any of that and have now a new purpose-built type - I considered using the generated (attr.rust.archetype_native) type, but a custom built made a lot more sense for untangling the mess of adhoc queries we have around Pinhole. It might not look like it but the aspiration here was to not change how things work by much while having things better decoupled & cleaner.
Bonus: the odd resolution oracle we already used is now visible on the pinhole visualizers's ui

// TODO(andreas): Give this another pass and think about how we can remove this.
// Being disconnected from the blueprint & fallbacks makes this a weird snowflake with unexpected behavior.
// Also, figure out how this might actually relate to the transform cache.
pub fn query_pinhole_and_view_coordinates_from_store_without_blueprint(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is essentially what query_pinhole_legacy used to do. But with an EVEN scarier name!

Copy link

github-actions bot commented Jan 23, 2025

Web viewer failed to build.

| Result | Commit | Link | Manifest |
| ------ | ------- | ----- |
| ❌ | | https://rerun.io/viewer/pr/8789 | +nightly +main |

Note: This comment is updated whenever you push a commit.

Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a big surgery

crates/viewer/re_view_spatial/src/ui_2d.rs Show resolved Hide resolved
@Wumpf Wumpf merged commit 38a7438 into main Jan 24, 2025
25 of 26 checks passed
@Wumpf Wumpf deleted the andreas/rust/more-eager-2 branch January 24, 2025 09:11
teh-cmc pushed a commit that referenced this pull request Jan 24, 2025
### Related

* sister PR to..
	* #8789
	* #8785
	* #8793
* missed piece of #7245

### What

Ports the Tensor archetype in rust to the new eager serialized
interface.
Unfortunately this meant I had to remove some direct access methods of
the underlying tensor data. Curiously, this didn't affect any of our
test/snippet/example code.
While doing so I also fixed some wording issues in the (very similar)
C++ implementation of `with_dim_names`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants