Multi Touch In DAT

From Derivative
Revision as of 14:32, 1 September 2017 by Admin (talk | contribs) (TD Editor)
Jump to navigation Jump to search
  • Invalid title: ""


The Multi Touch In DAT is used for receiving messages and events from the Windows 7+ standard multi-touch API. It captures all the messages, where each new message changes the table it outputs. When a messages is added to the DAT, any script can be called pointing to the new message. The Multi Touch In DAT is most frequently sent to the Render Pick DAT.

It can output either of two table formats: (1) Raw Events as a FIFO (first in - first out) list, or (2) ID Table, which is the events processed into a more usable one-row-per-finger table.

The Raw Events format creates a FIFO-type DAT (see also FIFO DAT) which, for each multi-touch event, has a row added to the bottom of the table while at the same time a row at the top is deleted.

Note: To operate panel gadgets with multi-touch screens that send events through the Windows 7, 8 or 10 event stream, multi-touch works without requiring DATs. You need to use the DAT when using multiple fingers on one panel, like in a container displaying a 3D render whose objects you want to pick.

TThe ID table format includes the columns:

  • id - every finger press increases the id by 1
  • sn - an ongoing count of each finger press.
  • select - when 1, this row represents a finger is down.
  • downf - the absolute frame number when the finger press occurred.
  • upf - the absolute frame number that the finger press ended
  • x, y - the position, in pixels in the horizontal and vertical directions. NOTE: The x and y values are expressed in screen pixels, not panel width/height pixels. For example, the top-right corner of a panel will be different if the panel is scaled within another panel, window or network viewer. It is better to use u and v, and scale them by the panel Width and Height.
  • u, v - the position, 0 to 1 in the horizontal and vertical directions
  • downu, downv - the position, 0 to 1 in the horizontal and vertical directions when the touch first occured (ie. initial touch down location).

contactx, contacty - the width of the contact area. contactu, contactv - the height of the contact area.

    • monitor - monitor number, starting with 0
  • clicktime - like downf, in seconds
  • elapsedtime - the number of seconds that finger has been down.
  • changedtime - the time since the finger press that the most recent u or v value changed.
  • dclick - double-tap occurred
  • aux - user supplied data via PanelCOMP_Class method interactTouch.

You can use the attached callback DAT (named mtouchin1_callbacks) to react to multi-touch events. This is suitable for 2D interfaces that do not require a Render Pick DAT.

See the "multitouch" example in the Palette under Tools.

See also the Multi-Touch page.


Parameters - Page

Template:ParToggle Template:ParMenu Template:ParPanelRef Template:ParToggle Template:ParToggle Template:ParToggle Template:ParFloat Template:ParFloat Template:ParInteger Template:ParFloat

Parameters - Page

Template:ParDatRef Template:ParMenu Template:ParNodeRef Template:ParToggle Template:ParInteger Template:ParButton

Parameters - Common Page

Language language - - Select how the DAT decides which script language to operate on.

  • Input input - The DAT uses the inputs script language.
  • Node node - The DAT uses it's own script language.

Edit/View Extension extension - - Select the file extension this DAT should expose to external editors.

  • dat dat - various common file extensions.
  • From Language language - pick extension from DATs script language.
  • Custom Extension custom - Specify a custom extension.

Custom Extension customext - Specifiy the custom extension.

Word Wrap wordwrap - - Enable Word Wrap for Node Display.

  • Input input - The DAT uses the inputs setting.
  • On on - Turn on Word Wrap.
  • Off off - Turn off Word Wrap.

TouchDesigner Build:

Art-Net • CHOP Execute • CHOP to • Clip • Convert • CPlusPlus • DAT •  Execute • DAT Export • Error • EtherDream • Evaluate • Examine • Execute • FIFO • File In • File Out • Folder • In • Indices • Info • Insert • JSON • Keyboard In • Lookup • Merge • MIDI Event • MIDI In • Monitors • MQTT Client • Multi Touch In • NDI • Null • OP Execute • OP Find • OSC In • OSC Out • Out • Panel Execute • Parameter • Parameter Execute • Perform • Render Pick • Reorder • Script • Select • Serial • SocketIO • SOP to • Sort • Substitute • Switch • Table • TCP/IP • Text • Touch In • Touch Out • Transpose • TUIO In • UDP In • UDP Out • UDT In • UDT Out • Web Client • Web • Web Server • WebSocket • XML