User Tools

Site Tools


using_the_multiply_filter_to_create_fast-drag_gesture

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
using_the_multiply_filter_to_create_fast-drag_gesture [2015/10/09 17:44]
paul
using_the_multiply_filter_to_create_fast-drag_gesture [2015/10/09 22:15]
paul [The Multiply Filter]
Line 118: Line 118:
 The multiply filter can also multiply the result of a gesture dimension by a non-linear function of the factor. There are four different non linear methods available in the multiply filter: The multiply filter can also multiply the result of a gesture dimension by a non-linear function of the factor. There are four different non linear methods available in the multiply filter:
  
-quadratic +  * [[gestures:touch:advanced:gesture_property_mapping:quadratic_mapping|Quadratic Mapping]] 
-cubic +  ​* [[gestures:​touch:​advanced:​gesture_property_mapping:​cubic_mapping|Cubic Mapping]] 
-exp2 +  ​* [[gestures:​touch:​advanced:​gesture_property_mapping:​exponential_mapping| Exponential Mapping]]
-exp10 +
- +
-The "​exp10"​ function will "​multiply"​ the dimension into a exponential function such that the value of the dimension is raised "ten to the power" of the "​factor"​ value. For example this gesture object takes the result of the gesture dimension and multiplies it my ten to the power three (one thousand) so that the value is now a thousand times larger and in the case of the separation delta will cause the touch object to scale 1000 times faster than without the multiply filter: +
- +
-<code:csharp linenums:1> +
-<Gesture id="​3-point-scale-exponential"​ type="​scale">​ +
-    <​match>​ +
-        <​action>​ +
-            <​initial>​ +
-                <cluster point_number="​3"/>​ +
-            </​initial>​ +
-        </​action>​ +
-    </​match>​ +
-    <​analysis>​ +
-        <​algorithm class="​kinemetric"​ type="​continuous">​ +
-            <library module="​scale"/>​ +
-            <​returns>​ +
-                <​property id="​scale_dsx"​ result="​ds"/>​ +
-                <​property id="​scale_dsy"​ result="​ds"/>​ +
-            </​returns>​ +
-        </​algorithm>​ +
-    </​analysis>​ +
-    <​processing>​ +
-        <​multiply_filter>​ +
-            <​property ref="​scale_dsx"​ active="​true"​ func="​exp10"​ factor="​3"/>​ +
-            <​property ref="​scale_dsy"​ active="​true"​ func="​exp10"​ factor="​3"/>​ +
-        </​multiply_filter>​ +
-    </​processing> ​  +
-    <​mapping>​ +
-        <update dispatch_type="​continuous">​ +
-            <​gesture_event ​ type="​scale">​ +
-                <​property ref="​scale_dsx"​ target="​scaleX"/>​ +
-                <​property ref="​scale_dsy"​ target="​scaleY"/>​ +
-            </​gesture_event>​ +
-        </​update>​ +
-    </​mapping>​ +
-</​Gesture>​ +
-</​code>​ +
- +
-This "​3-point-scale-exponential"​ gesture is great for Zoomable User Interfaces or astronomical interfaces which may require exponentially changing scale values for navigation.+
using_the_multiply_filter_to_create_fast-drag_gesture.txt · Last modified: 2019/01/29 19:07 (external edit)