Skip to content

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

Merged
rdumusc merged 1 commit intoEyescale:masterfrom
rdumusc:master
Sep 28, 2016
Merged

Adjust to Deflect 0.12 v5 API, handle new PAN event#585
rdumusc merged 1 commit intoEyescale:masterfrom
rdumusc:master

Conversation

@rdumusc
Copy link
Copy Markdown

@rdumusc rdumusc commented Sep 28, 2016

@rdumusc rdumusc force-pushed the master branch 2 times, most recently from 83eca9a to 01b8b9c Compare September 28, 2016 12:02
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
Copy Markdown
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
Copy Markdown
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...

case ::deflect::Event::EVT_MOVE:
// no break;
case ::deflect::Event::EVT_PAN:
_proxy->setNavigationMode(
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@dnachbaur
Copy link
Copy Markdown
Member

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

@rdumusc
Copy link
Copy Markdown
Author

rdumusc commented Sep 28, 2016

OK, done!

@dnachbaur
Copy link
Copy Markdown
Member

Typo 'Delfect' in PR title and commit msg

@dnachbaur
Copy link
Copy Markdown
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
@rdumusc rdumusc merged commit bf0ba1a into Eyescale:master 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