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

GetFixedFrame transforms more frames than it needs to #22

Closed
Amarcolina opened this issue Feb 29, 2016 · 2 comments
Closed

GetFixedFrame transforms more frames than it needs to #22

Amarcolina opened this issue Feb 29, 2016 · 2 comments
Assignees

Comments

@Amarcolina
Copy link
Contributor

The current implementation of LeapProvider.GetFixedFrame calls GetTransformedFrame every time it obtains a new frame inside the inner loop. All but one of these frames is going to be discarded, and so the transformation is wasteful. It should acquire un-transformed frame objects, and only transform the once that is selected.

@cherullo
Copy link

cherullo commented Mar 1, 2016

This was also solved in PR #16.
By the way, regarding @protodeep 's commit above, it doesn't actually avoid multiple transformations, since the assignment to closest can happen more than once.
The leapMat assignment can also be taken out of the loop, since it's not supposed to change each iteration.
Also, isn't leap_controller_.Frame() == leap_controller_.Frame(0) ? If that's so, then shouldn't the loop begin with searchHistoryIndex = 1 ?

@codemercenary
Copy link

Tracking research is actually interested in building an extrapolation mechanism into the API which puts the extrapolation/interpolation responsibility on the API side. This would allow us to feed a timestamp down in to LeapC and retrieve an interpolated frame corresponding to that timestamp.

We should find a solution here which enables us to swap out the way the interpolation works at a later time, once it's supported by the underlying system.

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

No branches or pull requests

4 participants