MeshBaker
Public Types | Public Attributes | Protected Member Functions | Properties | Events | List of all members
FingerMotionDetector Class Reference

The finger motion detector component is not an actual gesture but is responsible for tracking the motion (or stillness) of a specific finger More...

Inherits FGComponent.

Public Types

enum  MotionState { MotionState.None, MotionState.Stationary, MotionState.Moving }
 Motion state More...
 

Public Attributes

float MoveThreshold = 5.0f
 Tolerance distance the finger is allowed to move from its initial position without being recognized as an actual motion More...
 

Protected Member Functions

override void OnUpdate (FingerGestures.IFingerList touches)
 This is called after FingerGestures has updated the state of each finger More...
 
void RaiseOnMoveBegin ()
 
void RaiseOnMove ()
 
void RaiseOnMoveEnd ()
 
void RaiseOnStationaryBegin ()
 
void RaiseOnStationary ()
 
void RaiseOnStationaryEnd ()
 
- Protected Member Functions inherited from FGComponent
virtual void Awake ()
 
virtual void Start ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Properties

virtual FingerGestures.Finger Finger [get, set]
 Get or set the finger to track More...
 
MotionState State [get]
 Current finger motion state More...
 
MotionState PreviousState [get]
 Finger motion state during the previous update More...
 
int Moves [get]
 Number of moves performed A complete MoveBegin/Move/MoveEnd sequence counts for 1 move. More...
 
bool Moved [get]
 Return true if at least one finger move was performed (see Moves property above) More...
 
bool WasMoving [get]
 Return true if Moving was true during the previous update More...
 
bool Moving [get]
 Is the finger currently moving this frame? More...
 
float ElapsedStationaryTime [get]
 Amount of time spent during the last or current stationary state sequence from OnBeginStationary up to OnEndStationary. More...
 
Vector2 AnchorPos [get]
 Reference position used to evaluate if we're still within the move threshold distance. More...
 

Events

EventDelegate< FingerMotionDetectorOnMoveBegin
 Event fired when the finger started moving beyond the MoveThreshold. More...
 
EventDelegate< FingerMotionDetectorOnMove
 Event fired when the finger has moved since last update. More...
 
EventDelegate< FingerMotionDetectorOnMoveEnd
 Event fired when the finger has stopped moving More...
 
EventDelegate< FingerMotionDetectorOnStationaryBegin
 Event fired when the finger starts being stationary (not moving) More...
 
EventDelegate< FingerMotionDetectorOnStationary
 Event fired on each frame that the finger remains stationary. More...
 
EventDelegate< FingerMotionDetectorOnStationaryEnd
 Event fired when the finger stops being stationary (starts moving) Use ElapsedStationaryTime to retreive the total amount of time the finger stayed stationary ElapsedStationaryTime More...
 

Additional Inherited Members

- Public Member Functions inherited from FGComponent
delegate void EventDelegate< T > (T source)
 

Detailed Description

The finger motion detector component is not an actual gesture but is responsible for tracking the motion (or stillness) of a specific finger

Member Enumeration Documentation

§ MotionState

Motion state

Enumerator
None 

Undefined

Stationary 

The finger is not moving

Moving 

The finger is moving

Member Function Documentation

§ OnUpdate()

override void FingerMotionDetector.OnUpdate ( FingerGestures.IFingerList  touches)
protectedvirtual

This is called after FingerGestures has updated the state of each finger

Parameters
touchesThe list of fingers currently down / touching the screen

Implements FGComponent.

§ RaiseOnMove()

void FingerMotionDetector.RaiseOnMove ( )
protected

§ RaiseOnMoveBegin()

void FingerMotionDetector.RaiseOnMoveBegin ( )
protected

§ RaiseOnMoveEnd()

void FingerMotionDetector.RaiseOnMoveEnd ( )
protected

§ RaiseOnStationary()

void FingerMotionDetector.RaiseOnStationary ( )
protected

§ RaiseOnStationaryBegin()

void FingerMotionDetector.RaiseOnStationaryBegin ( )
protected

§ RaiseOnStationaryEnd()

void FingerMotionDetector.RaiseOnStationaryEnd ( )
protected

Member Data Documentation

§ MoveThreshold

float FingerMotionDetector.MoveThreshold = 5.0f

Tolerance distance the finger is allowed to move from its initial position without being recognized as an actual motion

Property Documentation

§ AnchorPos

Vector2 FingerMotionDetector.AnchorPos
get

Reference position used to evaluate if we're still within the move threshold distance.

This is the last initial stationary position (initial finger contact position, or finger position during the last OnMoveEnd event)

§ ElapsedStationaryTime

float FingerMotionDetector.ElapsedStationaryTime
get

Amount of time spent during the last or current stationary state sequence from OnBeginStationary up to OnEndStationary.

§ Finger

virtual FingerGestures.Finger FingerMotionDetector.Finger
getset

Get or set the finger to track

§ Moved

bool FingerMotionDetector.Moved
get

Return true if at least one finger move was performed (see Moves property above)

§ Moves

int FingerMotionDetector.Moves
get

Number of moves performed A complete MoveBegin/Move/MoveEnd sequence counts for 1 move.

§ Moving

bool FingerMotionDetector.Moving
get

Is the finger currently moving this frame?

§ PreviousState

MotionState FingerMotionDetector.PreviousState
getprotected

Finger motion state during the previous update

§ State

MotionState FingerMotionDetector.State
getprotected

Current finger motion state

§ WasMoving

bool FingerMotionDetector.WasMoving
get

Return true if Moving was true during the previous update

Event Documentation

§ OnMove

EventDelegate<FingerMotionDetector> FingerMotionDetector.OnMove

Event fired when the finger has moved since last update.

Use MoveDelta to retrieve the motion performed since last update MoveDelta

§ OnMoveBegin

EventDelegate<FingerMotionDetector> FingerMotionDetector.OnMoveBegin

Event fired when the finger started moving beyond the MoveThreshold.

Use AnchorPos corresponds to retrieve the last starting position AnchorPos MoveThreshold

§ OnMoveEnd

EventDelegate<FingerMotionDetector> FingerMotionDetector.OnMoveEnd

Event fired when the finger has stopped moving

§ OnStationary

EventDelegate<FingerMotionDetector> FingerMotionDetector.OnStationary

Event fired on each frame that the finger remains stationary.

Use ElapsedStationaryTime to retreive the amount of time elapsed since the finger started being stationary ElapsedStationaryTime

§ OnStationaryBegin

EventDelegate<FingerMotionDetector> FingerMotionDetector.OnStationaryBegin

Event fired when the finger starts being stationary (not moving)

§ OnStationaryEnd

EventDelegate<FingerMotionDetector> FingerMotionDetector.OnStationaryEnd

Event fired when the finger stops being stationary (starts moving) Use ElapsedStationaryTime to retreive the total amount of time the finger stayed stationary ElapsedStationaryTime


The documentation for this class was generated from the following file: