using System; using System.Collections.Generic; namespace UnityEngine.XR.ARFoundation { /// /// Event arguments for the event. /// public struct ARPointCloudChangedEventArgs : IEquatable { /// /// The list of s added since the last event. /// public List added { get; private set; } /// /// The list of s udpated since the last event. /// public List updated { get; private set; } /// /// The list of s removed since the last event. /// public List removed { get; private set; } /// /// Constructs an . /// /// The list of s added since the last event. /// The list of s updated since the last event. /// The list of s removed since the last event. public ARPointCloudChangedEventArgs( List added, List updated, List removed) { this.added = added; this.updated = updated; this.removed = removed; } public override int GetHashCode() { unchecked { int hash = 0; hash = hash * 486187739 + (added == null ? 0 : added.GetHashCode()); hash = hash * 486187739 + (updated == null ? 0 : updated.GetHashCode()); hash = hash * 486187739 + (removed == null ? 0 : removed.GetHashCode()); return hash; } } public override bool Equals(object obj) { if (!(obj is ARPointCloudChangedEventArgs)) return false; return Equals((ARPointCloudChangedEventArgs)obj); } public override string ToString() { return string.Format("Added: {0}, Updated: {1}, Removed: {2}", added == null ? 0 : added.Count, updated == null ? 0 : updated.Count, removed == null ? 0 : removed.Count); } public bool Equals(ARPointCloudChangedEventArgs other) { return (added == other.added) && (updated == other.updated) && (removed == other.removed); } public static bool operator ==(ARPointCloudChangedEventArgs lhs, ARPointCloudChangedEventArgs rhs) { return lhs.Equals(rhs); } public static bool operator !=(ARPointCloudChangedEventArgs lhs, ARPointCloudChangedEventArgs rhs) { return !lhs.Equals(rhs); } } }