Imports System

''' <summary>
''' Four-dimensional structure to track gestures.
''' </summary>
Public Structure GesturePoint
    Public Property X As Double
    Public Property Y As Double
    Public Property Z As Double
    Public Property T As DateTime

    ''' <summary>
    ''' Determines whether the specified <see cref="System.Object"/> is equal to Me instance.
    ''' </summary>
    ''' <param name="obj">The <see cref="System.Object"/> to compare with Me instance.</param>
    ''' <returns>
    '''   <c>true</c> if the specified <see cref="System.Object"/> is equal to Me instance otherwise, <c>false</c>.
    ''' </returns>
    Public Overrides Function Equals(obj As Object) As Boolean
        Dim o As GesturePoint = CType(obj, GesturePoint)
        Return (Me.X = o.X) AndAlso (Me.Y = o.Y) AndAlso (Me.Z = o.Z) AndAlso (Me.T = o.T)
    End Function

    ''' <summary>
    ''' Returns a hash code for Me instance.
    ''' </summary>
    ''' <returns>
    ''' A hash code for Me instance, suitable for use in hashing algorithms and data structures like a hash table. 
    ''' </returns>
    Public Overrides Function GetHashCode() As Integer
        Return MyClass.GetHashCode()
    End Function
End Structure
