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
Afficher le fichier Open project: nuigroup/grafiti Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

PointToClient() public méthode

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.
Résultat void

addTuioCursor() public méthode

public addTuioCursor ( TuioCursor c ) : void
c TUIO.TuioCursor
Résultat void

addTuioObject() public méthode

public addTuioObject ( TuioObject obj ) : void
obj TUIO.TuioObject
Résultat void

refresh() public méthode

public refresh ( long timeStampAsLong ) : void
timeStampAsLong long
Résultat void

removeTuioCursor() public méthode

public removeTuioCursor ( TuioCursor c ) : void
c TUIO.TuioCursor
Résultat void

removeTuioObject() public méthode

public removeTuioObject ( TuioObject obj ) : void
obj TUIO.TuioObject
Résultat void

updateTuioCursor() public méthode

public updateTuioCursor ( TuioCursor c ) : void
c TUIO.TuioCursor
Résultat void

updateTuioObject() public méthode

public updateTuioObject ( TuioObject obj ) : void
obj TUIO.TuioObject
Résultat void