-
Notifications
You must be signed in to change notification settings - Fork 102
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
Adjust to Deflect 0.12 v5 API, handle new PAN event #585
Conversation
83eca9a
to
01b8b9c
Compare
const auto sign = dx + dy; | ||
const auto zoom = std::copysign( std::sqrt( dx*dx + dy*dy ), sign ); | ||
event.pointerWheel.xAxis = 0.f; | ||
event.pointerWheel.yAxis = zoom / 40.f; |
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.
where does the magic 40 come from?
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.
It's a bit of magic that was copied from the wheel event above and I cannot say that I understand what it corresponds to. Documentation for xAxis states: 'wheel rotation in clicks'. That value is then multiplied again by 0.05f in eqPly / seq / livre to move the camera...
@@ -202,6 +202,12 @@ void EventHandler::_processEvents( const Proxy* proxy ) | |||
case ::deflect::Event::EVT_DOUBLECLICK: | |||
break; | |||
case ::deflect::Event::EVT_MOVE: | |||
// no break; | |||
case ::deflect::Event::EVT_PAN: | |||
_proxy->setNavigationMode( |
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.
do we still need that mode + the print?
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.
If the mode is not set, the camera keeps rotating. I'm having a look if the print can be disabled
9034b06
to
a807a9b
Compare
Turns out the print and the rotation mode were specific to Deflect, so I removed them. Now the Channel::drawOverlay() looks suspiciously empty, but I didn't remove the applyOverlayState() and resetOverlayState() calls just to be safe. Let me know if you think they can be removed too. |
They can be removed too then. Just NOP it like frameViewStart() a few lines above. |
OK, done! |
Typo 'Delfect' in PR title and commit msg |
+1 otherwise |
Needs: BlueBrain/Deflect#130