Method and implementation device for inertial movement of window object
First Claim
1. A method for inertial movement of a window object, comprising:
- A;
monitoring initial touch operation of an input device, recording initial touch coordinate and touch time, and starting a first timer;
B;
in the process of dragging the window object, periodically triggering, by the first timer, an event of obtaining quantity of displacement and quantity of rotation that are generated on a screen by a user through the input device relative to a previous time point, and sending the obtained quantity of displacement and quantity of rotation to the window object;
C;
when the user releases the window object, obtaining initial linear speed and initial angular speed of the window object, and starting a second timer;
D;
based on the initial linear speed and the initial angular speed, periodically triggering, by the second timer, an event of obtaining current quantity of displacement and quantity of rotation of the window object according to deceleration of linear speed and deceleration of angular speed, and sending the obtained current quantity of displacement and quantity of rotation to the window object;
E;
when the initial linear speed and the initial angular speed corresponding to current period of the second timer are less than or equal to 0, terminating the process of inertial movement of the window object,wherein obtaining the current quantity of displacement and quantity of rotation of the window object according to the deceleration of linear speed and the deceleration of angular speed in Step D is;
quantity of displacement corresponding to Ti period of the second timer is;
(Δ
X,Δ
Y)=(Vi−
Vdec*Tg)*Tg;
quantity of rotation corresponding to Ti period of the second timer is;
α
i=(Vai−
Vadec*Tg)*Tg;
where Vdec is the deceleration of linear speed, Vadec is the deceleration of angular speed;
Vi is initial linear speed corresponding to Ti period of the second timer;
Vai is initial angular speed corresponding to Ti period of the second timer;
Tg is a timing period of the second timer;
an initial linear speed and an initial angular speed corresponding to a first period of the second timer after the input device releases the window object are the ones obtained in Step C respectively.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided are a method and an implementation device for inertial movement of a window object, to realize inertial movement effect of a window object based on linear speed and angular speed. When an input device releases a window object being dragged, the initial linear speed and the initial angular speed are obtained, and then the deceleration of linear speed and the deceleration of angular speed are used to obtain quantity of displacement and quantity of rotation corresponding to each processing period; the inertial movement effect of the window object is simulated after the release of a mouse button or the release of a finger from a touch screen. Through the method and device, the inertial movement effect of the window object is realized, thereby facilitating touch operation, enhancing ease of use of terminal software, and improving user experience.
-
Citations
9 Claims
-
1. A method for inertial movement of a window object, comprising:
-
A;
monitoring initial touch operation of an input device, recording initial touch coordinate and touch time, and starting a first timer;B;
in the process of dragging the window object, periodically triggering, by the first timer, an event of obtaining quantity of displacement and quantity of rotation that are generated on a screen by a user through the input device relative to a previous time point, and sending the obtained quantity of displacement and quantity of rotation to the window object;C;
when the user releases the window object, obtaining initial linear speed and initial angular speed of the window object, and starting a second timer;D;
based on the initial linear speed and the initial angular speed, periodically triggering, by the second timer, an event of obtaining current quantity of displacement and quantity of rotation of the window object according to deceleration of linear speed and deceleration of angular speed, and sending the obtained current quantity of displacement and quantity of rotation to the window object;E;
when the initial linear speed and the initial angular speed corresponding to current period of the second timer are less than or equal to 0, terminating the process of inertial movement of the window object,wherein obtaining the current quantity of displacement and quantity of rotation of the window object according to the deceleration of linear speed and the deceleration of angular speed in Step D is; quantity of displacement corresponding to Ti period of the second timer is;
(Δ
X,Δ
Y)=(Vi−
Vdec*Tg)*Tg;quantity of rotation corresponding to Ti period of the second timer is;
α
i=(Vai−
Vadec*Tg)*Tg;where Vdec is the deceleration of linear speed, Vadec is the deceleration of angular speed;
Vi is initial linear speed corresponding to Ti period of the second timer;
Vai is initial angular speed corresponding to Ti period of the second timer;
Tg is a timing period of the second timer;
an initial linear speed and an initial angular speed corresponding to a first period of the second timer after the input device releases the window object are the ones obtained in Step C respectively. - View Dependent Claims (2)
-
-
3. A method for inertial movement of a window object, comprising:
-
A;
monitoring initial touch operation of an input device, recording initial touch coordinate and touch time, and starting a first timer;B;
in the process of dragging the window object, periodically triggering, by the first timer, an event of obtaining quantity of displacement and quantity of rotation that are generated on a screen by a user through the input device relative to a previous time point, and sending the obtained quantity of displacement and quantity of rotation to the window object;C;
when the user releases the window object, obtaining initial linear speed and initial angular speed of the window object, and starting a second timer;D;
based on the initial linear speed and the initial angular speed, periodically triggering, by the second timer, an event of obtaining current quantity of displacement and quantity of rotation of the window object according to deceleration of linear speed and deceleration of angular speed, and sending the obtained current quantity of displacement and quantity of rotation to the window object;E;
when the initial linear speed and the initial angular speed corresponding to current period of the second timer are less than or equal to 0, terminating the process of inertial movement of the window object,wherein the user drags, with one or multiple touch points, the window object through the input device; in the case of multiple touch points, the quantity of displacement and the quantity of rotation is obtained based on two touch points with smallest device numbers, wherein in the case of single touch point, obtaining the quantity of displacement and the quantity of rotation in Step B is; quantity of displacement between Ti-1 and Ti is;
(Δ
X,Δ
Y)=(Xi−
Xi-1, Yi−
Yi-1),where (Xi, Yi) is a coordinate vector of a touch point corresponding to Ti period of the first timer, and (Xi-1, Yi-1) is a coordinate vector of a touch point corresponding to Ti-1 period of the first timer; quantity of rotation between Ti-1 and Ti is;
α
i=arcos [ui·
vi/(|ui∥
vi|)];wherein a rotation center coordinate is a center coordinate of the window object;
(Cx, Cy);
ui is a vector between the touch point coordinate corresponding to Ti period of the first timer and the rotation center coordinate, namely ui=(Xi−
Cx, Yi−
Cy);
vi is a vector between the touch point coordinate corresponding to Ti-1 period of the first timer and the rotation center coordinate, namely vi=(Xi-1−
Cx, Yi-1−
Cy);obtaining the initial linear speed V and the initial angular speed Va in Step C is;
V=(Xn−
Xn-1,Yn−
Yn-1)/(Tn−
Tn-1)=(Xn−
Xn-1,Yn−
Yn-1)/Δ
t,where (Xn, Yn) is a coordinate vector of a touch point corresponding to a last period Tn of the first timer when the input device releases the window object;
(Xn-1, Xn-1) is a coordinate vector of a touch point corresponding to Tn-1 period;
Δ
t is a timing period of the first timer;
Va=arcos [un·
vn/(|un∥
vn|)]/(Tn−
Tn-1)=arcos [un·
vn/(|un∥
vn|)]/Δ
t,where un is a vector between the touch point coordinate (Xn, Yn) corresponding to Tn period of the first timer and the rotation center coordinate (Cx, Cy), namely un=(Xn−
Cx, Yn−
Cy), when the input device releases the window object; and
vn is a vector between the touch point coordinate corresponding to Tn-1 period of the first timer and the rotation center coordinate, namely vn=(Xn-1−
Cx, Yn-1−
Cy). - View Dependent Claims (7)
-
-
4. A method for inertial movement of a window object, comprising:
-
A;
monitoring initial touch operation of an input device, recording initial touch coordinate and touch time, and starting a first timer;B;
in the process of dragging the window object, periodically triggering, by the first timer, an event of obtaining quantity of displacement and quantity of rotation that are generated on a screen by a user through the input device relative to a previous time point, and sending the obtained quantity of displacement and quantity of rotation to the window object;C;
when the user releases the window object, obtaining initial linear speed and initial angular speed of the window object, and starting a second timer;D;
based on the initial linear speed and the initial angular speed, periodically triggering, by the second timer, an event of obtaining current quantity of displacement and quantity of rotation of the window object according to deceleration of linear speed and deceleration of angular speed, and sending the obtained current quantity of displacement and quantity of rotation to the window object;E;
when the initial linear speed and the initial angular speed corresponding to current period of the second timer are less than or equal to 0, terminating the process of inertial movement of the window object,wherein the user drags, with one or multiple touch points, the window object through the input device; in the case of multiple touch points, the quantity of displacement and the quantity of rotation is obtained based on two touch points with smallest device numbers, wherein in the case of multiple touch points, obtaining the quantity of displacement and the quantity of rotation in Step B is; quantity of displacement between Ti-1 and Ti is;
(Δ
X,Δ
Y)=(CXi−
CXi-1, CYi−
CYi-1),where (CXi, CYi) and (CXi-1, CYi-1) are center coordinates of two touch points with smallest device numbers corresponding respectively to Ti period and Ti-1 period of the first timer; quantity of rotation between Ti-1 and Ti is;
α
i=arcos [ui·
vi/(|ui∥
vi|)],where ui is a vector formed by the two touch points with the smallest device numbers corresponding to Ti period of the first timer, vi is a vector formed by the two touch points with the smallest device numbers corresponding to Ti-1 period of the first timer; obtaining V and Va in Step C is;
V=(CXn−
CXn-1,CYn−
CYn-1)/(Tn−
Tn-1)=(CXn−
CXn-1,CYn−
CYn-1)/Δ
t,where (CXn, CYn) and (CXn-1, CYn-1) are center coordinates of vectors which are formed by the two touch points with the smallest device numbers respectively during a last period Tn and Tn-1 period of the first timer, when the input device releases the window object;
Δ
t is a timing period of the first timer;
Va=arcos [un·
vn/(|un∥
vn|)]/(Tn−
Tn-1)=arcos [un·
vn/(|un∥
vn|)]/Δ
t,where un is a vector formed by the two touch points with the smallest device numbers corresponding to the last period Tn of the first timer when the input device releases the window object, and vn is a vector formed by the two touch points with the smallest device numbers corresponding to Tn-1 period. - View Dependent Claims (8)
-
-
5. A device for inertial movement of a window object, comprising:
-
a touch point capturing unit, configured to capture operation that an input device drags the window object on a screen, and generate corresponding control information; a drag processing unit, configured to realize dragging effect of the window object according to the control information sent from the touch point capturing unit, obtain initial linear speed and initial angular speed when the input device releases the window object, and send the obtained initial linear speed and the initial angular speed to an inertia processing unit; and the inertia processing unit, configured to, based on the initial linear speed and the initial angular speed sent from the drag processing unit, realize inertial movement effect according to deceleration of linear speed and deceleration of angular speed, wherein the drag processing unit comprises; a first movement processing unit, configured to start a first timer when receiving the initial control information sent from the touch point capturing unit, obtain, according to the current control information sent from the touch point capturing unit, quantity of displacement and quantity of rotation of the window object corresponding to current period of the first timer under triggering of the first timer, and send the obtained quantity of displacement and quantity of rotation to the window object; and an initial speed processing unit, configured to obtain the initial linear speed and the initial angular speed after receiving the release control information sent from the touch point capturing unit, and send the obtained initial linear speed and initial angular speed to the inertia processing unit, wherein in the case of single touch point, the first movement processing unit obtains the quantity of displacement and the quantity of rotation through the following way; quantity of displacement Ti-1 and Ti is;
(Δ
X,Δ
Y)=(Xi−
Xi-1, Yi−
Yi-1),wherein, (Xi, Yi) is a coordinate vector of a touch point corresponding to Ti period of the first timer and (Xi-1, Yi-1) is a coordinate vector of a touch point corresponding to Ti-1 period of the first timer; quantity of rotation between Ti-1 and Ti is;
α
i=arcos [ui·
vi/(|ui∥
vi|)];wherein a rotation center coordinate is a center coordinate of the window object;
(Cx, Cy);
ui is a vector between the touch point coordinate corresponding to Ti period of the first timer and the rotation center coordinate, namely ui=(Xi−
Cx, Yi−
Cy);
vi is a vector between the touch point coordinate corresponding to Ti-1 period of the first timer and the rotation center coordinate, namely vi=(Xi-1−
Cx, Yi-1−
Cy);the initial speed processing unit obtains the initial linear speed V and the initial angular speed Va through the following way;
V=(Xn−
Xn-1,Yn−
Yn-1)/(Tn−
Tn-1)=(Xn−
Xn-1,Yn−
Yn-1)/Δ
t,where (Xn, Yn) is a coordinate vector of a touch point corresponding to a last period Tn of the first timer when the input device releases the window object;
(Xn-1, Yn-1) is a coordinate vector of a touch point corresponding to Tn-1 period;
Δ
t is a timing period of the first timer;
Va=arcos [un·
vn/(|un∥
vn|)]/(Tn−
Tn-1)=arcos [un·
vn/(|un∥
vn|)]/Δ
t,where un is a vector between the touch point coordinate (Xn, Yn) corresponding to Tn period of the first timer and the rotation center coordinate (Cx, Cy), namely un=(Xn−
Cx, Yn−
Cy) when the input device releases the window object; and
vn is a vector between the touch point coordinate corresponding to Tn-1 period of the first timer and the rotation center coordinate, namely vn=(Xn-1−
Cx, Yn-1−
Cy);in the case of multiple touch points, the first movement processing unit obtains the quantity of displacement and the quantity of rotation through the following way; the quantity of displacement between Ti-1 and Ti is;
(Δ
X,Δ
Y)=CXi−
CXi-1, CYi−
CYi-1),where (CXi, CYi) and (CXi-1, CYi-1) are center coordinates of two touch points with smallest device numbers corresponding respectively to Ti period and Ti-1 period of the first timer; the quantity of rotation between Ti-1 and Ti is;
α
i=arcos [ui·
vi/(|ui∥
vi|)],where ui is a vector formed by the two touch points with the smallest device numbers corresponding to Ti period of the first timer, vi is a vector formed by the two touch points with the smallest device numbers corresponding to Ti-1 period of the first timer; the initial speed processing unit obtains the initial linear speed V and the initial angular speed Va through the following way;
V=(CXn−
CXn-1,CYn−
CYn-1)/(Tn−
Tn-1)=(CXn−
CXn-1,CYn−
CYn-1)/Δ
twhere (CXn, CYn) and (CXn-1, CYn-1) are center coordinates of vectors which are formed by the two touch points with the smallest device numbers respectively during a last period Tn and Tn-1 period of the first timer, when the input device releases the window object;
Δ
t is a timing period of the first timer;
Va=arcos [un·
vn/(|un∥
vn|)]|/(Tn−
Tn-1)=arcos [un·
vn/(|un∥
vn|)]Δ
t,where un is a vector formed by the two touch points with the smallest device numbers corresponding to the last period Tn of the first timer, when the input device releases the window object, and vn is a vector formed by the two touch points with the smallest device numbers corresponding to Tn-1 period. - View Dependent Claims (6)
-
-
9. A device for inertial movement of a window object, comprising:
-
a touch point capturing unit, configured to capture operation that an input device drags the window object on a screen, and generate corresponding control information; a drag processing unit, configured to realize dragging effect of the window object according to the control information sent from the touch point capturing unit, obtain initial linear speed and initial angular speed when the input device releases the window object, and send the obtained initial linear speed and the initial angular speed to an inertia processing unit; and the inertia processing unit, configured to, based on the initial linear speed and the initial angular speed sent from the drag processing unit, realize inertial movement effect according to deceleration of linear speed and deceleration of angular speed wherein the drag processing unit comprises; a first movement processing unit, configured to start a first timer when receiving the initial control information sent from the touch point capturing unit, obtain, according to the current control information sent from the touch point capturing unit, quantity of displacement and quantity of rotation of the window object corresponding to current period of the first timer under triggering of the first timer, and send the obtained quantity of displacement and quantity of rotation to the window object; and an initial speed processing unit, configured to obtain the initial linear speed and the initial angular speed after receiving the release control information sent from the touch point capturing unit, and send the obtained initial linear speed and initial angular speed to the inertia processing unit, wherein the inertia processing unit obtains the current quantity of displacement and quantity of rotation of the window object according to the deceleration of linear speed and the deceleration of angular speed through the following way; quantity of displacement corresponding to Ti period of a second timer is;
(Δ
X,Δ
Y)=(Vi−
Vdec*Tg)*Tg;quantity of rotation corresponding to Ti period of the second timer is;
α
i=(Vai−
Vadec*Tg)*Tg;where Vdec is the deceleration of linear speed, Vadec is the deceleration of angular speed;
Vi is an initial linear speed corresponding to Ti period of the second timer;
Vai is initial angular speed corresponding to Ti period of the second timer;
Tg is a timing period of the second timer;
an initial linear speed and an initial angular speed corresponding to a first period of the second timer after the input device releases the window object are the ones sent by the drag processing unit respectively.
-
Specification