Struct PanGesture
A pan gesture received from a magic trackpad.
Implements
Inherited Members
Namespace: Unity.AppUI.Core
Assembly: Unity.AppUI.dll
Syntax
public struct PanGesture : IEquatable<PanGesture>Constructors
PanGesture(Vector2, Vector2, TouchPhase)
Constructor.
Declaration
public PanGesture(Vector2 position, Vector2 deltaPos, TouchPhase phase)Parameters
| Type | Name | Description | 
|---|---|---|
| Vector2 | position | The position of the touch in normalized coordinates. | 
| Vector2 | deltaPos | The delta position of the touch since the last frame. | 
| TouchPhase | phase | The phase of the gesture. | 
Properties
deltaPos
The delta position of the touch since the last frame.
Declaration
public readonly Vector2 deltaPos { get; }Property Value
| Type | Description | 
|---|---|
| Vector2 | 
phase
The phase of the gesture.
Declaration
public readonly TouchPhase phase { get; }Property Value
| Type | Description | 
|---|---|
| TouchPhase | 
position
The position of the touch in normalized coordinates.
Declaration
public readonly Vector2 position { get; }Property Value
| Type | Description | 
|---|---|
| Vector2 | 
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | The object to compare with the current object. | 
Returns
| Type | Description | 
|---|---|
| bool | True if objects are equal, false otherwise. | 
Overrides
Equals(PanGesture)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(PanGesture other)Parameters
| Type | Name | Description | 
|---|---|---|
| PanGesture | other | The object to compare with the current object. | 
Returns
| Type | Description | 
|---|---|
| bool | True if objects are equal, false otherwise. | 
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()Returns
| Type | Description | 
|---|---|
| int | A hash code for the current object. | 
Overrides
Operators
operator ==(PanGesture, PanGesture)
Determines whether two specified PanGesture objects are equal.
Declaration
public static bool operator ==(PanGesture left, PanGesture right)Parameters
| Type | Name | Description | 
|---|---|---|
| PanGesture | left | The first PanGesture to compare. | 
| PanGesture | right | The second PanGesture to compare. | 
Returns
| Type | Description | 
|---|---|
| bool | True if the first PanGesture is equal to the second PanGesture, false otherwise. | 
operator !=(PanGesture, PanGesture)
Determines whether two specified PanGesture objects are not equal.
Declaration
public static bool operator !=(PanGesture left, PanGesture right)Parameters
| Type | Name | Description | 
|---|---|---|
| PanGesture | left | The first PanGesture to compare. | 
| PanGesture | right | The second PanGesture to compare. | 
Returns
| Type | Description | 
|---|---|
| bool | True if the first PanGesture is not equal to the second PanGesture, false otherwise. |