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

implement IProjectionSpace #332

Open
gregsn opened this issue Jan 13, 2018 · 1 comment
Open

implement IProjectionSpace #332

gregsn opened this issue Jan 13, 2018 · 1 comment

Comments

@gregsn
Copy link
Contributor

gregsn commented Jan 13, 2018

https://github.com/vvvv/vvvv/commit/3875b7079204d106cc0a822a2ff3bb32562620fb#diff-dc9dac49f758a8824170070e3b0ef204

to get a pixel position posPix into projection space following steps have to be taken:

  • identify the viewport the posPix is in
  • get from window pixel space to viewport pixels: by just substracting left/top of viewport from posPix
  • get from pixels to normalized viewport coords (-1/1 being lefttop 1/-1 rightbottom)
  • undo the crop to get into normalized projection space
  • undo the aspect ratio to get into projection space

this will help people to interact with their scene no matter how complex the setup

@gregsn
Copy link
Contributor Author

gregsn commented Jan 14, 2018

the feature to see here is that the rendered cursor (the quad) is at the right place and is quadratic.
callmenames_2018 01 14-02 29 33
so this is my try of implementing IProjectionSpace:
gregsn@225100c
i had to do several other things to be able to use the newest plugin interface.
todo:

  • make Preserve Aspect of WithinProjection true by default and add that change to the diffff.xml
  • when rendering resuse the the FViewports instead of recomputing them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant