PtAttributeGenerator is an abstract class. To create a custom attribute generator, subclass
PtAttributeGenerator and define the attributeValue()
method to return the desired attribute value
for a given touch event symbol.
PtGesture represents a gesture as regular expression touch symbols specified by PtTouchSymbols. The regular expression is converted to its equivalent DFA, which PtGesture uses for gesture matching. It also maintains a list of callbacks and associated confidence calculators indexed from 0. PtGesture objects are added to a PtTouchProcessor which manages gesture matching via PtGestureMatchers.
PtGestureMatcher maintains a gesture set comprised of PtGestures as well as a set of PtAttributeGenerators that generate attribute values for each PtTouchSymbol being matched for the set. The developer need never directly interact with a PtGestureMatcher.
PtSplitStreamAttributeGenerator is an abstract class. To create a custom split stream attribute generator
subclass PtSplitStreamAttributeGenerator, define the attributeValue()
method to return the desired
attribute value that assigns the given touch event symbol to one of the touch event streams. In addition,
define gestureMatcherForAttributeValue()
that returns the index of the stream that corresponds to a given
attribute value. Unlike a PtAttributeGenerator, the PtSplitStreamAttributeGenerator is assigned to
the PtTouchProcessor and not to a PtGestureMatcher.
The PtTouchProcessor manages one or more PtGestureMatchers. By default there is only one PtGestureMatcher. PtTouchProcessor receives PtTouchSymbols and sends them to the PtGestureMatcher for gesture matching. In split stream scenarios in which the developer defines a PtSplitStreamAttributeGenerator, the PtTouchProcessor manages one PtGestureMatcher per stream and sends PtTouchSymbol to the PtGestureMatcher corresponding to the split stream attribute value.
PtTouchSymbol represents a Proton touch event symbol. It contains the symbol string consisting of a touch action, touch id, and a list of attribute values. For example, D0:Foo translates to touch DOWN with id 0 and attribute value "Foo". When using a PtTouchSymbol to describe a gesture regular expression, the developer can add a trigger to the PtTouchSymbol. The trigger is an index to the gesture's callback list. The callback should be executed when the PtTouchSymbol is matched.
PtTransitionTable is used to represent the DFA (and NFA) of the gesture regular expressions
PtTuioListener listens for TUIO events, converts them to PtTuioTouchSymbols, and sends them to the specified PtTouchProcessor for processing.
PtTuioTouchSymbol is a subclass of PtTouchSymbol. PtTuioTouchSymbol stores the touch data of the TUIO event.