EquisFtirTuio API Documentation

From EQUIS Lab Wiki

Jump to: navigation, search

Contents

Ftir Class

Listens for TUIO messages and provides a list of events that occurred since they were last polled.

Namespace: Equis.Xna.Input

Constructor

Ftir()

Initializes a new instance of the Ftir class.

Methods

FtirEvent[] PollEvents(float requiredMass)

Returns an array of FtirEvent that have occurred since the last polling. Does not rely on requiredMass variable as this is not supported by TUIO.

Deprecated Methods

void Calibrate(Vector2[] expectedPositions, Vector2[] actualPositions)

Maintained only for backwards compatibility and performs no function in EquisFtirTuio. Calibration should be done within the CCV application.

static Ftir FromCapture(string capturePath)

Maintained only for backwards compatibility. Returns a new instance of the Ftir class (same as the constructor) and does not rely on the capturePath parameter.

void PreviewFiltered(Texture2D texture)

Maintained only for backwards compatibility and performs no function.

void PreviewInput(Texture2D texture)

Maintained only for backwards compatibility and performs no function.

Properties

Format

Gets the VideoFormat of the Ftir object. Maintained only for backwards compatibility.

FtirEvent Class

Represents an event occurring on the Ftir tabletop. (Pressing down, releasing and dragging)

Namespace: Equis.Xna.Input

Constructors

FtirEvent(long cursorId, int type, float x, float y)

Initializes a new instance of the FtirEvent class. Parameters are:

  • cursorId: unique identifier of the cursor responsible for the event.
  • type: the type of event, either press (1), release (-1), update(0) or other (-2).
  • x: the x coordinate of the event (between 0 and 1).
  • y: the y coordinate of the event (between 0 and 1).

FtirEvent(int type, Vector2 position, float mass)

  • type: the type of event, either press (1), release (-1), update(0) or other (-2).
  • position: the position of the event as a 2 dimensional vector.
  • mass: the mass of the FTIR event (used only to retain compatibility).

Properties

CursorId

Gets the unique cursor ID of the FtirEvent.

Frame

Gets the frame number of the FtirEvent. Currently only returns 0.

Mass

Gets the mass of the FtirEvent. Currently only returns a default value of 10000.

Position

Gets the position of the FtirEvent as a 2 dimensional vector.

Press

Gets whether the FtirEvent was a press event.

Release

Gets whether the FtirEvent was a release event.

Since

Gets the amount of time that the FtirEvent has existed. Currently only returns 0.

X

Gets the x coordinate of the FtirEvent.

Y

Gets the y coordinate of the FtirEvent.

VideoFormat Class

Maintained only for backwards compatibility. Represents information about the video format used for Ftir.

Namespace: Equis.Xna.Input

Constructor

VideoFormat(SurfaceFormat format, int width, int height, long frameInterval)

Initializes a new instance of the VideoFormat class. Parameters:

  • format: the surface format of the video.
  • width: the width of the video.
  • height: the height of the video.
  • frameInterval: the frame interval of the video format.

Properties

Format

Gets the format of the video.

FrameInterval

Gets the frame interval of the video.

FramesPerSecond

Gets the number of frames per second of the video.

Width

Gets the width of the video.

Height

Gets the height of the video.