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

Sunset MeshProperties, introduce TriangleIndices and friends #6169

Merged
merged 5 commits into from
May 2, 2024
Merged

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Apr 30, 2024

MeshProperties was a hack that was required because of the old join semantics.
We can now make Mesh3D.triangle_indices what we always intended: a Vec<UVec3>.

(This won't work in the web viewer generated by this PR since it breaks the Mesh3D ABI.)

Migrations

C++

  rerun::Mesh3D(positions)
-     .with_mesh_properties(rerun::components::MeshProperties::from_triangle_indices({{2, 1, 0}}))
+     .with_triangle_indices({{2, 1, 0}})

Python

  rr.Mesh3D(
      vertex_positions=…,
-     indices=[2, 1, 0],
+     triangle_indices=[2, 1, 0],
  ),

Rust

  rerun::Mesh3D::new(positions)
-     .with_mesh_properties(rerun::MeshProperties::from_triangle_indices([[2, 1, 0]]))
+     .with_triangle_indices([[2, 1, 0]])

image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

Copy link

github-actions bot commented Apr 30, 2024

Deployed docs

Commit Link
62848df https://landing-68yhs41b3-rerun.vercel.app/docs

@teh-cmc teh-cmc marked this pull request as draft April 30, 2024 10:25
@rerun-io rerun-io deleted a comment from github-actions bot Apr 30, 2024
@teh-cmc teh-cmc marked this pull request as ready for review April 30, 2024 10:37
@rerun-io rerun-io deleted a comment from github-actions bot Apr 30, 2024
Copy link
Member Author

Choose a reason for hiding this comment

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

I have absolutely no idea why this was the only one with nullability baked in oO.

Probably an old hack if I had to guess...

@jleibs
Copy link
Member

jleibs commented Apr 30, 2024

This still breaks join semantics.

You've just made it so that breaking join semantics is now allowed and the knowledge of how to join is implicitly deferred to the visualizer.

I still think we should consider introducing a "non-joinable" attribute as an annotation for components where the conventional join is known not to work to help us out with things like instance-selection.

@teh-cmc
Copy link
Member Author

teh-cmc commented Apr 30, 2024

@rerun-bot full-check

Copy link

@teh-cmc teh-cmc added the 🪵 Log & send APIs Affects the user-facing API for all languages label May 2, 2024
@emilk emilk self-requested a review May 2, 2024 12:07
crates/re_types/src/components/triangle_indices_ext.rs Outdated Show resolved Hide resolved
docs/snippets/all/mesh3d_indexed.cpp Outdated Show resolved Hide resolved
rerun_cpp/src/rerun/components/triangle_indices_ext.cpp Outdated Show resolved Hide resolved
rerun_cpp/src/rerun/components/triangle_indices_ext.cpp Outdated Show resolved Hide resolved
@teh-cmc teh-cmc merged commit 2b9f4ba into main May 2, 2024
40 checks passed
@teh-cmc teh-cmc deleted the cmc/5402 branch May 2, 2024 13:37
@teh-cmc teh-cmc changed the title Sunset MeshProperties, introduce UVector3D and friends Sunset MeshProperties, introduce TriangleIndices and friends May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔩 data model include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages 🍏 primitives Relating to Rerun primitives
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of awkward MeshProperties
3 participants