Struct TouchLocation
Represents a touch location.
Namespace: Evergine.Common.Input
Assembly: Evergine.Common.dll
Syntax
public struct TouchLocation
Constructors
TouchLocation(int, TouchLocationState, float, float, bool)
Initializes a new instance of the TouchLocation struct.
Declaration
public TouchLocation(int id, TouchLocationState state, float x, float y, bool isNew)
Parameters
Type | Name | Description |
---|---|---|
int | id | The ID. |
TouchLocationState | state | The state. |
float | x | The X coordinate. |
float | y | The Y coordinate. |
bool | isNew | If set to |
Fields
Id
Touch ID.
Declaration
public int Id
Field Value
Type | Description |
---|---|
int |
IsNew
Whether the point is new or previously existing.
Declaration
public bool IsNew
Field Value
Type | Description |
---|---|
bool |
Position
The touch position.
Declaration
public Vector2 Position
Field Value
Type | Description |
---|---|
Vector2 |
State
Touch state.
Declaration
public TouchLocationState State
Field Value
Type | Description |
---|---|
TouchLocationState |
Methods
Equals(TouchLocation)
Compares the specified object for equality.
Declaration
public bool Equals(TouchLocation other)
Parameters
Type | Name | Description |
---|---|---|
TouchLocation | other | The object to compare. |
Returns
Type | Description |
---|---|
bool | The result of the comparison. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Operators
operator ==(TouchLocation, TouchLocation)
Implements the operator ==.
Declaration
public static bool operator ==(TouchLocation t1, TouchLocation t2)
Parameters
Type | Name | Description |
---|---|---|
TouchLocation | t1 | The first operand. |
TouchLocation | t2 | The second operand. |
Returns
Type | Description |
---|---|
bool | The result of the operation. |
operator !=(TouchLocation, TouchLocation)
Implements the operator !=.
Declaration
public static bool operator !=(TouchLocation t1, TouchLocation t2)
Parameters
Type | Name | Description |
---|---|---|
TouchLocation | t1 | The first operand. |
TouchLocation | t2 | The second operand. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |