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.
파일 보기 프로젝트 열기: nuigroup/grafiti 1 사용 예제들

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