User Tools

Site Tools


gestures:touch:complex:manipulation:n-manipulate

N-Manipulate

(Touch → Complex → Manipulations → Compound N Point Drag, Rotate And Scale Gesture “N-Manipulate”)

The manipulate gesture is a single gesture that combines three transformation analysis steps in three separate gesture objects into one. The change in the translation, scale and rotation of the touch point cluster in calculated using the “manipulate” algorithm and returned in five independent gesture object dimensions: “dx” , “dy” , “dsx” , “dsy” and “dtheta”. As long as the matching criteria is met (one to ten touch points are recognized by the touch object), the values are continuously queried and dispatched in a structured gesture event that maps the dimensions to: “x” , “y” , “scaleX”, “scaleY” and “rotation”.

<Gesture id="n-manipulate" type="manipulate">
    <match>
        <action>
            <initial>
                <cluster point_number="0" point_number_min="1" point_number_max="10"/>
            </initial>
        </action>
    </match>       
    <analysis>
        <algorithm class="kinemetric" type="continuous">
            <library module="manipulate"/>
            <returns>
                <property id="dx" result="dx"/>
                <property id="dy" result="dy"/>
                <property id="dsx" result="ds"/>
                <property id="dsy" result="ds"/>
                <property id="dtheta" result="dtheta"/>
            </returns>
        </algorithm>
    </analysis>                                    
    <mapping>
        <update dispatch_type="continuous">
            <gesture_event type="manipulate">
                <property ref="dx" target="x"/>
                <property ref="dy" target="y"/>
                <property ref="dsx" target="scaleX"/>
                <property ref="dsy" target="scaleY"/>
                <property ref="dtheta" target="rotation"/>
            </gesture_event>
        </update>
     </mapping>
</Gesture>
gestures/touch/complex/manipulation/n-manipulate.txt · Last modified: 2015/09/14 19:17 by glass