summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2011-02-16 18:20:14 +0100
committerHenrik Rydberg <rydberg@euromail.se>2011-02-16 18:20:14 +0100
commitd619da633517175ffa6977a80760673628f91583 (patch)
tree42bddbfbd1b69dcaa8aaf82a6709f21b00e26efb /include
parent7864e778cc10dbc2b0064f0f1953ef5389f0d68b (diff)
Add velocity estimate
The per-touch velocity is useful in many contexts. This patch adds a simple estimator of the velocity, which also smooths out position jumps caused by course-grained event updates. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include')
-rw-r--r--include/utouch/frame.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/utouch/frame.h b/include/utouch/frame.h
index 03a44aa..60195ef 100644
--- a/include/utouch/frame.h
+++ b/include/utouch/frame.h
@@ -115,6 +115,8 @@ struct utouch_surface {
115 * @orientation: direction of ellipse (left: -Pi/2, up: 0, right: Pi/2) 115 * @orientation: direction of ellipse (left: -Pi/2, up: 0, right: Pi/2)
116 * @pressure: pressure of contact (pressure units) 116 * @pressure: pressure of contact (pressure units)
117 * @distance: distance of contact (surface units) 117 * @distance: distance of contact (surface units)
118 * @vx: horizontal velocity coordinate (units / millisecond)
119 * @vy: vertical velocity coordinate (units / millisecond)
118 * 120 *
119 * Surface contact details. Later versions of this struct may grow in 121 * Surface contact details. Later versions of this struct may grow in
120 * size, but will remain binary compatible with older versions. 122 * size, but will remain binary compatible with older versions.
@@ -138,6 +140,8 @@ struct utouch_contact {
138 float orientation; 140 float orientation;
139 float pressure; 141 float pressure;
140 float distance; 142 float distance;
143 float vx;
144 float vy;
141}; 145};
142 146
143/* time in milliseconds */ 147/* time in milliseconds */