C# Class Grafiti.Surface

Defines the main singleton instance that processes Tuio cursor messages and retrieves informations from the client about the tuio objects and the GUI components in the surface.
Inheritance: TuioListener
Mostra file Open project: nuigroup/grafiti Class Usage Examples

Public Methods

Method Description
Initialize ( IGrafitiClientGUIManager guiManager ) : Surface

Initializes the surface and set the client's GUI manager.

PointToClient ( IGestureListener target, float x, float y, float &cx, float &cy ) : void

Takes a GUI control and point specified in Grafiti-coordinate-system and returns the point relative to the GUI component in client's coordinates.

addTuioCursor ( TuioCursor c ) : void
addTuioObject ( TuioObject obj ) : void
refresh ( long timeStampAsLong ) : void
removeTuioCursor ( TuioCursor c ) : void
removeTuioObject ( TuioObject obj ) : void
updateTuioCursor ( TuioCursor c ) : void
updateTuioObject ( TuioObject obj ) : void

Private Methods

Method Description
CreateGroup ( ) : Group
GetMatchingGroup ( CursorPoint cursor, List targets, bool isZControl ) : Group

Clustering method. Determine the best matching group to add the cursor's trace to. If none existing groups are suitable, a new one is created.

GetTargetsAt ( float x, float y, List &targets ) : bool

Get targets for a point and returns true if such point is over a Z-control.

ProcessCurrentAddingCursors ( int timeStamp ) : void
ProcessCurrentRemovingCursors ( int timeStamp ) : void
ProcessCurrentUpdatingCursors ( int timeStamp ) : void
RemoveNonResurrectableGroups ( int timeStamp ) : void
RemoveNonResurrectableTraces ( int timeStamp ) : void
Surface ( ) : System
TryResurrectTrace ( CursorPoint cursor, Trace &resurrectingTrace ) : bool

Method Details

Initialize() public static method

Initializes the surface and set the client's GUI manager.
public static Initialize ( IGrafitiClientGUIManager guiManager ) : Surface
guiManager IGrafitiClientGUIManager Client's GUI manager to set.
return Surface

PointToClient() public method

Takes a GUI control and point specified in Grafiti-coordinate-system and returns the point relative to the GUI component in client's coordinates.
public PointToClient ( IGestureListener target, float x, float y, float &cx, float &cy ) : void
target IGestureListener The GUI component.
x float X coordinate of the point to convert.
y float Y coordinate of the point to convert.
cx float X coordinate of the converted point.
cy float Y coordinate of the converted point.
return void

addTuioCursor() public method

public addTuioCursor ( TuioCursor c ) : void
c TUIO.TuioCursor
return void

addTuioObject() public method

public addTuioObject ( TuioObject obj ) : void
obj TUIO.TuioObject
return void

refresh() public method

public refresh ( long timeStampAsLong ) : void
timeStampAsLong long
return void

removeTuioCursor() public method

public removeTuioCursor ( TuioCursor c ) : void
c TUIO.TuioCursor
return void

removeTuioObject() public method

public removeTuioObject ( TuioObject obj ) : void
obj TUIO.TuioObject
return void

updateTuioCursor() public method

public updateTuioCursor ( TuioCursor c ) : void
c TUIO.TuioCursor
return void

updateTuioObject() public method

public updateTuioObject ( TuioObject obj ) : void
obj TUIO.TuioObject
return void