locked
Inertia component of the GESTUREINFO structure RRS feed

  • Question

  • I am trying to better understand the inertia vector of the GESTUREINFO structure.

       "The HIDWORD of the ullArguments member is always 0, with the following exceptions:

        For GID_PAN, it is 0 except when there is inertia. When GF_INERTIA is set,  the HIDWORD is an inertia vector (two 16-bit values)."

    I am using Windows Touch Gestures in my user interface to perform some movement of an element.  When the user lifts their finger I can detect that the dwFlags variable now comes from inertia (dwFlags & GF_INERTIA).  At that point I want to take control of the movement in order to smoothly transition to the most appropriate location.  To do this I need two things, the current velocity and the ending position once inertia has been used up.  I could write my own tracker to determine the velocity and then also use that to estimate the final position.  However, I was wondering if the inertia value could assist with this. Unfortunately, I don't understand how the inertia vector is calculated and how it relates to actual movement of the gesture.

    Friday, February 14, 2014 9:16 PM

All replies

  • Hi, I am also trying to understand it. I really don't understand why MSDN is always so badly documented. I've heard for years Microsoft wants to make it good, but honestly it's just not got at all... 

    Have you get any answer about your question ?

    Thanks a lot,

    Pierre


    Pierre

    Thursday, November 20, 2014 4:51 PM