using System; using System.Collections.Generic; namespace UnityEngine.XR.ARFoundation { /// /// A structure for occlusion information pertaining to a particular frame. This is used to communicate information /// in the event. /// public struct AROcclusionFrameEventArgs : IEquatable { /// /// The occlusion textures associated with this frame. These are generally external textures, which exist only /// on the GPU. To use them on the CPU (for example, for computer vision processing), you must read them back /// from the GPU. /// public List textures { get; internal set; } /// /// Ids of the property name associated with each texture. This is a /// parallel List to the list. /// public List propertyNameIds { get; internal set; } /// /// The list of keywords to be enabled for the material. /// public List enabledMaterialKeywords { get; internal set; } /// /// The list of keywords to be disabled for the material. /// public List disabledMaterialKeywords { get; internal set; } /// /// Generates a hash suitable for use with containers like `HashSet` and `Dictionary`. /// /// A hash code generated from this object's fields. public override int GetHashCode() => HashCodeUtil.Combine( HashCodeUtil.ReferenceHash(textures), HashCodeUtil.ReferenceHash(propertyNameIds), HashCodeUtil.ReferenceHash(enabledMaterialKeywords), HashCodeUtil.ReferenceHash(disabledMaterialKeywords)); /// /// Tests for equality. /// /// The `object` to compare against. /// `True` if is of type and /// also returns `true`; otherwise `false`. public override bool Equals(object obj) => (obj is AROcclusionFrameEventArgs) && Equals((AROcclusionFrameEventArgs)obj); /// /// Tests for equality. /// /// The other to compare against. /// `True` if every field in is equal to this , otherwise false. public bool Equals(AROcclusionFrameEventArgs other) => (((textures == null) ? (other.textures == null) : textures.Equals(other.textures)) && ((propertyNameIds == null) ? (other.propertyNameIds == null) : propertyNameIds.Equals(other.propertyNameIds)) && ((enabledMaterialKeywords == null) ? (other.enabledMaterialKeywords == null) : enabledMaterialKeywords.Equals(other.enabledMaterialKeywords)) && ((disabledMaterialKeywords == null) ? (other.disabledMaterialKeywords == null) : disabledMaterialKeywords.Equals(other.disabledMaterialKeywords))); /// /// Tests for equality. Same as . /// /// The left-hand side of the comparison. /// The right-hand side of the comparison. /// `True` if is equal to , otherwise `false`. public static bool operator ==(AROcclusionFrameEventArgs lhs, AROcclusionFrameEventArgs rhs) => lhs.Equals(rhs); /// /// Tests for inequality. Same as `!`. /// /// The left-hand side of the comparison. /// The right-hand side of the comparison. /// `True` if is not equal to , otherwise `false`. public static bool operator !=(AROcclusionFrameEventArgs lhs, AROcclusionFrameEventArgs rhs) => !lhs.Equals(rhs); } }