C# Класс Grafiti.GestureRecognizer

Base class of gesture recognizers (GRs). A GR, that is dynamically instantiated by Grafiti, processes data of a single instance of the class Group for the recognition of a gesture. In case of successful recognition the GR can be enabled to send gesture events to the registered listeners. A GR can be parametrized through a configuration at the time of registration of a handler.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddHandler void
GetEventInfo System.Reflection.EventInfo
OnTerminating1 void
Process1 void
RaisePendlingEvents void

Открытые методы

Метод Описание
GestureRecognizer ( GRConfiguration configuration ) : System
Process ( List traces ) : void

The main function that will process the user input. It will be called on every refresh of the TUIO messages.

Защищенные методы

Метод Описание
AppendEvent ( GestureEventHandler ev, GestureEventArgs args ) : void

Use this method to send events. If the GR is not armed (e.g. it's in competition with other GRs), events will be scheduled in a queue and raised as soon as the GR will be armed. If the GR is already armed, events are raised immediately.

OnTerminating ( ) : void

Called when the GR is going to be removed from the list of active GRs and thus it won't be called anymore. Override this to handle the finalization of the GR if needed, like terminating threads, freeing resources, send terminating events... From now on, recognition state transitions will be in fact ignored. Note: at least one of the following reasons causes this method to be called: - the GR has been explicitly put in the 'terminated' state through one of the relative methods called in its Process function - the group ceased to be active i.e. all the fingers have been removed for a sufficient time, such that the traces can't be reset anymore - an exclusive GR with precedence has won In case of an LGR the following reasons are also possible: - its target has been removed from the group's LGR-list - an LGR with different target has the precedence and has won

Terminate ( bool successful ) : void
Terminate ( bool successful, float confidence ) : void
ValidateGesture ( ) : void
ValidateGesture ( float confidence ) : void

Приватные методы

Метод Описание
AddHandler ( string ev, GestureEventHandler handler ) : void
GetEventInfo ( string ev ) : EventInfo
OnTerminating1 ( ) : void
Process1 ( List traces ) : void
RaisePendlingEvents ( ) : void

Описание методов

AppendEvent() защищенный Метод

Use this method to send events. If the GR is not armed (e.g. it's in competition with other GRs), events will be scheduled in a queue and raised as soon as the GR will be armed. If the GR is already armed, events are raised immediately.
protected AppendEvent ( GestureEventHandler ev, GestureEventArgs args ) : void
ev GestureEventHandler The event
args GestureEventArgs The event's arguments
Результат void

GestureRecognizer() публичный Метод

public GestureRecognizer ( GRConfiguration configuration ) : System
configuration GRConfiguration
Результат System

OnTerminating() защищенный Метод

Called when the GR is going to be removed from the list of active GRs and thus it won't be called anymore. Override this to handle the finalization of the GR if needed, like terminating threads, freeing resources, send terminating events... From now on, recognition state transitions will be in fact ignored. Note: at least one of the following reasons causes this method to be called: - the GR has been explicitly put in the 'terminated' state through one of the relative methods called in its Process function - the group ceased to be active i.e. all the fingers have been removed for a sufficient time, such that the traces can't be reset anymore - an exclusive GR with precedence has won In case of an LGR the following reasons are also possible: - its target has been removed from the group's LGR-list - an LGR with different target has the precedence and has won
protected OnTerminating ( ) : void
Результат void

Process() публичный абстрактный Метод

The main function that will process the user input. It will be called on every refresh of the TUIO messages.
public abstract Process ( List traces ) : void
traces List The list of the updated traces, to which one element has been added to their cursor list.
Результат void

Terminate() защищенный Метод

protected Terminate ( bool successful ) : void
successful bool
Результат void

Terminate() защищенный Метод

protected Terminate ( bool successful, float confidence ) : void
successful bool
confidence float
Результат void

ValidateGesture() защищенный Метод

protected ValidateGesture ( ) : void
Результат void

ValidateGesture() защищенный Метод

protected ValidateGesture ( float confidence ) : void
confidence float
Результат void