Package libavg :: Module avg :: Class TouchEvent

Class TouchEvent




Raised when a touch or other tracking event occurs. Touch events happen only when a multi-touch sensitive surface or other camera tracker is active. For each touch event, statistical data based on moments are calculated.

Instance Methods
 
getContour()
Extracts contour envelope sequence for the event
 
getRelatedEvents()
Returns a python tuple containing the events 'related' to this one.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

    Inherited from Event
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
Properties
  area
Size of the blob found in pixels (ro).
  center
Position as double.
  cursorid
  eccentricity
  inertia
  lastdownpos
The initial position of the cursor.
  majoraxis
Major axis of an ellipse that is similar to the blob (ro).
  minoraxis
Minor axis of an ellipse that is similar to the blob (ro).
  node
The node that the event handler was declared in (ro).
  orientation
Angle of the blob.
  pos
Position in the global coordinate system (ro).
  source
TOUCH for actual touches, TRACK for hands above the surface or generic tracking.
  speed
Current speed of the blob in pixels per millisecond as a 2-component vector (ro).
  x
x position in the global coordinate system (ro).
  y
y position in the global coordinate system (ro).

Inherited from object: __class__

    Inherited from Event
  type
One of KEYUP, KEYDOWN, CURSORMOTION, CURSORUP, CURSORDOWN, CURSOROVER, CURSOROUT, RESIZE or QUIT.
  when
The timestamp of the event in milliseconds.
Method Details

getRelatedEvents()

 
Returns a python tuple containing the events 'related' to this one. For TOUCH events (fingers), the tuple contains one element: the corresponding TRACK event (hand). For TRACK events, the tuple contains all TOUCH events that belong to the same hand.
Returns:
events


Property Details

area

Size of the blob found in pixels (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

center

Position as double. Used for calibration (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

cursorid

Get Method:
unreachable.<unnamed Boost.Python function>(...)

eccentricity

Get Method:
unreachable.<unnamed Boost.Python function>(...)

inertia

Get Method:
unreachable.<unnamed Boost.Python function>(...)

lastdownpos

The initial position of the cursor. Useful for implementing dragging.
Get Method:
unreachable.<unnamed Boost.Python function>(...)

majoraxis

Major axis of an ellipse that is similar to the blob (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

minoraxis

Minor axis of an ellipse that is similar to the blob (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

node

The node that the event handler was declared in (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

orientation

Angle of the blob. For hovering hands, this is roughly the direction of the hand (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

pos

Position in the global coordinate system (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

source

TOUCH for actual touches, TRACK for hands above the surface or generic tracking.
Get Method:
unreachable.<unnamed Boost.Python function>(...)

speed

Current speed of the blob in pixels per millisecond as a 2-component vector (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

x

x position in the global coordinate system (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)

y

y position in the global coordinate system (ro).
Get Method:
unreachable.<unnamed Boost.Python function>(...)