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

Adjust to Deflect 0.12 v5 API, handle new PAN event #585

Merged
merged 1 commit into from
Sep 28, 2016

Conversation

rdumusc
Copy link

@rdumusc rdumusc commented Sep 28, 2016

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;
Copy link
Member

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?

Copy link
Author

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(
Copy link
Member

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?

Copy link
Author

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

@rdumusc rdumusc force-pushed the master branch 2 times, most recently from 9034b06 to a807a9b Compare September 28, 2016 14:13
@rdumusc
Copy link
Author

rdumusc commented Sep 28, 2016

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.

@tribal-tec
Copy link
Member

They can be removed too then. Just NOP it like frameViewStart() a few lines above.

@rdumusc
Copy link
Author

rdumusc commented Sep 28, 2016

OK, done!

@tribal-tec
Copy link
Member

Typo 'Delfect' in PR title and commit msg

@tribal-tec
Copy link
Member

+1 otherwise

@rdumusc rdumusc changed the title Adjust to Delfect 0.12 v5 API, handle new PAN event Adjust to Deflect 0.12 v5 API, handle new PAN event Sep 28, 2016
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

Successfully merging this pull request may close these issues.

2 participants