Skip to content

Conversation

@gselzer
Copy link
Collaborator

@gselzer gselzer commented Jul 22, 2025

This PR reimplements "zoom to fit" functionality as computations on the scenegraph model, replacing the existing implementations which delegated the functionality to the current visualization toolkit.

Builds atop #27.

gselzer added 30 commits July 10, 2025 16:57
Defines how 2D view NDC are mapped to vectors in 3D space
In the pursuit of a single source of truth, let's resort to the
projection matrix (when/if possible?) for this.
For some reason, if I don't do this, the Matrix3D constructor RESURRECTS
some previous matrix I used in a previous test
Thanks to @tlambert03 for the suggestion. Could probably be cleaned up
further, but at least this is a step in the right direction!
Eventually, we'll want to compute grids ourselves on the model side, I
think, but for now this works
...man, this feels so good
Notably, this limits the type of pygfx-specific interaction available.
But we need a scenex version of this anyways - planning to implement the
beginnings of this with events
Still need to add that functionality to child nodes...somehow :)
@gselzer gselzer requested a review from tlambert03 July 22, 2025 17:52
@gselzer gselzer self-assigned this Jul 22, 2025
@gselzer gselzer added the enhancement New feature or request label Jul 22, 2025
@gselzer gselzer mentioned this pull request Jul 22, 2025
5 tasks
@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

Attention: Patch coverage is 97.56098% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.48%. Comparing base (5e325f0) to head (b655e9d).

Files with missing lines Patch % Lines
src/scenex/utils/projections.py 94.73% 2 Missing ⚠️
src/scenex/model/_nodes/image.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   80.83%   82.48%   +1.64%     
==========================================
  Files          42       43       +1     
  Lines        1529     1593      +64     
==========================================
+ Hits         1236     1314      +78     
+ Misses        293      279      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tlambert03
Copy link
Member

very exciting! Away for work this week, but will try to sneak in a review at some point soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants