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

Pinch gesture: two fingers moving closer or further away from each other More...

Inherits MultiFingerGestureRecognizer.

Inherited by MousePinchGestureRecognizer.

Public Attributes

float MinDOT = -0.7f
 Pinch DOT product treshold - this controls how tolerant the pinch gesture detector is to the two fingers moving in opposite directions. More...
 
float MinDistance = 5.0f
 Minimum pinch distance required to trigger the pinch gesture More...
 
float DeltaScale = 1.0f
 How much to scale the internal pinch delta by before raising the OnPinchMove event More...
 
- Public Attributes inherited from GestureRecognizer
GestureResetMode ResetMode = GestureResetMode.StartOfTouchSequence
 Get or set the reset mode for this gesture recognizer More...
 

Protected Member Functions

override int GetRequiredFingerCount ()
 Return the exact number of active touches required for the gesture to be valid More...
 
override bool CanBegin (FingerGestures.IFingerList touches)
 This controls whether or not the gesture recognition should begin More...
 
override void OnBegin (FingerGestures.IFingerList touches)
 Method called when the gesture recognizer has just started recognizing a valid gesture More...
 
override GestureState OnActive (FingerGestures.IFingerList touches)
 Method called on each frame that the gesture recognizer is in an active state More...
 
void RaiseOnPinchBegin ()
 
void RaiseOnPinchMove ()
 
void RaiseOnPinchEnd ()
 
- Protected Member Functions inherited from MultiFingerGestureRecognizer
override void Start ()
 
void OnFingerCountChanged (int fingerCount)
 
- Protected Member Functions inherited from GestureRecognizer
virtual void Reset ()
 Put back the gesture recognizer in Ready state and reset any relevant data ResetMode More...
 
virtual void OnTouchSequenceStarted ()
 Called when the first finger of a new multi-touch sequence has touched the screen More...
 
virtual void OnTouchSequenceEnded ()
 Called when all the fingers that participated in the current multi-touch sequence are no longer touching the screen More...
 
override void OnUpdate (FingerGestures.IFingerList touches)
 This is called after FingerGestures has updated the state of each finger More...
 
virtual GestureState OnReady (FingerGestures.IFingerList touches)
 
virtual bool ShouldFailFromReady (FingerGestures.IFingerList touches)
 
bool Young (FingerGestures.IFingerList touches)
 Check if all the touches in the list started recently More...
 
- Protected Member Functions inherited from FGComponent
virtual void Awake ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Protected Attributes

float delta = 0.0f
 

Properties

float Delta [get]
 Signed change in distance between the two fingers since last update A negative value means the two fingers got closer, while a positive value means they moved further apart More...
 
- Properties inherited from MultiFingerGestureRecognizer
Vector2 [] StartPosition [get, set]
 
Vector2 [] Position [get, set]
 
int RequiredFingerCount [get]
 
- Properties inherited from GestureRecognizer
GestureState PreviousState [get]
 Get the previous gesture state More...
 
GestureState State [get, protected set]
 Get or set the current gesture state More...
 
bool IsActive [get]
 Return true if the gesture recognition has started and is on-going State More...
 
FingerGestures.ITouchFilter TouchFilter [get, set]
 Get or set the touch filter used to modify the list of active touches about to be processed by the gesture recognizer More...
 

Events

EventDelegate< PinchGestureRecognizerOnPinchBegin
 Event fired when the More...
 
EventDelegate< PinchGestureRecognizerOnPinchMove
 Event fired when the distance between the two fingers has changed Delta More...
 
EventDelegate< PinchGestureRecognizerOnPinchEnd
 Event fired when the gesture has ended (e.g. More...
 
- Events inherited from GestureRecognizer
EventDelegate< GestureRecognizerOnStateChanged
 Event fired whenever the gesture recognizer state changes State PreviousState More...
 

Additional Inherited Members

- Public Types inherited from GestureRecognizer
enum  GestureState { GestureState.Ready, GestureState.InProgress, GestureState.Failed, GestureState.Recognized }
 Possible gesture states More...
 
enum  GestureResetMode { GestureResetMode.NextFrame, GestureResetMode.EndOfTouchSequence, GestureResetMode.StartOfTouchSequence }
 The reset mode determines when to reset a GestureRecognizer after it fails or succeed (GestureState.Failed or GestureState.Recognized) More...
 
- Public Member Functions inherited from MultiFingerGestureRecognizer
Vector2 GetPosition (int index)
 Get the position of the finger at the given index More...
 
Vector2 GetStartPosition (int index)
 Get the initial position of the finger at the given index More...
 
- Public Member Functions inherited from GestureRecognizer
virtual bool CheckCanBeginDelegate (FingerGestures.IFingerList touches)
 
delegate bool CanBeginDelegate (GestureRecognizer gr, FingerGestures.IFingerList touches)
 
void SetCanBeginDelegate (CanBeginDelegate f)
 
CanBeginDelegate GetCanBeginDelegate ()
 
- Public Member Functions inherited from FGComponent
delegate void EventDelegate< T > (T source)
 

Detailed Description

Pinch gesture: two fingers moving closer or further away from each other

NOTE: it is recommanded to set ResetMode to GestureResetMode.NextFrame for this gesture

Member Function Documentation

§ CanBegin()

override bool PinchGestureRecognizer.CanBegin ( FingerGestures.IFingerList  touches)
protectedvirtual

This controls whether or not the gesture recognition should begin

Parameters
touchesThe active touches

Reimplemented from GestureRecognizer.

§ GetRequiredFingerCount()

override int PinchGestureRecognizer.GetRequiredFingerCount ( )
protectedvirtual

Return the exact number of active touches required for the gesture to be valid

Implements GestureRecognizer.

§ OnActive()

override GestureState PinchGestureRecognizer.OnActive ( FingerGestures.IFingerList  touches)
protectedvirtual

Method called on each frame that the gesture recognizer is in an active state

Parameters
touchesThe active touches
Returns
The new state the gesture recognizer should be in

Implements GestureRecognizer.

§ OnBegin()

override void PinchGestureRecognizer.OnBegin ( FingerGestures.IFingerList  touches)
protectedvirtual

Method called when the gesture recognizer has just started recognizing a valid gesture

Parameters
touchesThe active touches

Implements GestureRecognizer.

§ RaiseOnPinchBegin()

void PinchGestureRecognizer.RaiseOnPinchBegin ( )
protected

§ RaiseOnPinchEnd()

void PinchGestureRecognizer.RaiseOnPinchEnd ( )
protected

§ RaiseOnPinchMove()

void PinchGestureRecognizer.RaiseOnPinchMove ( )
protected

Member Data Documentation

§ delta

float PinchGestureRecognizer.delta = 0.0f
protected

§ DeltaScale

float PinchGestureRecognizer.DeltaScale = 1.0f

How much to scale the internal pinch delta by before raising the OnPinchMove event

§ MinDistance

float PinchGestureRecognizer.MinDistance = 5.0f

Minimum pinch distance required to trigger the pinch gesture

§ MinDOT

float PinchGestureRecognizer.MinDOT = -0.7f

Pinch DOT product treshold - this controls how tolerant the pinch gesture detector is to the two fingers moving in opposite directions.

Setting this to -1 means the fingers have to move in exactly opposite directions to each other. this value should be kept between -1 and 0 excluded.

Property Documentation

§ Delta

float PinchGestureRecognizer.Delta
get

Signed change in distance between the two fingers since last update A negative value means the two fingers got closer, while a positive value means they moved further apart

Event Documentation

§ OnPinchBegin

EventDelegate<PinchGestureRecognizer> PinchGestureRecognizer.OnPinchBegin

Event fired when the

§ OnPinchEnd

EventDelegate<PinchGestureRecognizer> PinchGestureRecognizer.OnPinchEnd

Event fired when the gesture has ended (e.g.

at least one of the fingers was lifted off)

§ OnPinchMove

EventDelegate<PinchGestureRecognizer> PinchGestureRecognizer.OnPinchMove

Event fired when the distance between the two fingers has changed Delta


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