User Tools

Site Tools


gestures:touch:simple:spatial:rotate:n-rotate

N-Rotate

(Touch → Spatial → Rotate → Simple N Point Rotate Gesture “N-Rotate”)



The N-Rotate gesture is designed to provide object rotation functionality using any number of touch points. It is considered to be one of the three fundamental object manipulation gestures.

This gesture can be activated by any number of touch points between 2 and 10. When two or more touch points are recognized on a touch object the relative orientation of the touch points are tracked and grouped into a cluster. This change in the orientation of the cluster is mapped directly to the rotation of the touch object.

<Gesture id="n-rotate" type="rotate">
    <match>
        <action>
            <initial>
                <cluster point_number="0" point_number_min="2" point_number_max="10"/>
            </initial>
        </action>
    </match>
    <analysis>
        <algorithm class="kinemetric" type="continuous">
            <library module="rotate"/>
            <returns>
                <property id="rotate_dtheta" result="dtheta"/>
            </returns>
        </algorithm>
    </analysis>  
    <mapping>
        <update dispatch_type="continuous">
            <gesture_event type="rotate">
                <property ref="rotate_dtheta" target="rotate"/>
            </gesture_event>
        </update>
    </mapping>
</Gesture>
gestures/touch/simple/spatial/rotate/n-rotate.txt · Last modified: 2015/10/08 23:09 by paul