User Tools

Site Tools


Activating And Adjusting Gesture Boundaries

The Boundary Filter

The “boundary filter” uses the known touch object properties (referenced via the <mapping> tag) to determine weather a gesture dimension value should or should not be assigned directly to a the associated touch object. The “boundary_max” attribute set the max allowed value. The “boundary_min” sets the minimum allowed value.

In the “n-drag-limits” gesture max and min boundaries are independently set for each gesture dimension. Any display object associated with this gesture object will only be “allowed” to move to a position on the “x” axis between “200” and “1720” and a position on the “y” axis between “200” and “880”. This has the effect of creating a boundary margin or “buffer” (in an application window of 1920×1080) of 200 pixels where the display object cannot move.

This boundary effect can be very useful when establishing property limits on gesture objects that use the “inertial_filter” as it can effectively contain display object motion inside virtual walls.

<Gesture id="n-drag-limits" type="drag">
                <cluster point_number="2"/>
        <algorithm class="kinemetric" type="continuous">
            <library module="drag"/>
                <property id="dx" result="dx"/>
                <property id="dy" result="dy"/>
            <property ref="dx" active="true" boundary_min="200" boundary_max="1720"/>
            <property ref="dy" active="true" boundary_min="200" boundary_max="880"/>
        <update dispatch_type="continuous">
            <gesture_event type="drag">
                <property ref="dx" target="x"/>
                <property ref="dy" target="y"/>

Currently when a boundary condition is met the dimension value that it is associated with is immediately limited or capped at that value. This creates the effect of a “hard” boundary that cannot be passed. A future extension to this filter is the option of using different “soft” boundary modes using simulated elastic effects (sinusoidal exponential decay curves) that mimic critically damped oscillations.

activating_and_adjusting_gesture_boundaries.txt · Last modified: 2019/01/29 19:06 (external edit)