namespace UnityEngine.XR.ARSubsystems { /// /// Represents the alignment of a plane, e.g., whether it is horizontal or vertical. /// /// public enum PlaneAlignment { /// /// No alignment /// None = 0, /// /// The plane is horizontal with an upward facing normal, e.g., a floor. /// HorizontalUp = 100, /// /// The plane is horizontal with a downward facing normal, e.g., a ceiling. /// HorizontalDown = 101, /// /// The plane is vertical, e.g., a wall. /// Vertical = 200, /// /// The plane is not axis aligned. /// NotAxisAligned = 300 } /// /// Extension methods for the enum. /// public static class PlaneAlignmentExtensions { /// /// Determines whether the plane is horizontal (whether facing up or down). /// /// The being extended. /// true if the plane is horizontal. public static bool IsHorizontal(this PlaneAlignment alignment) { return (alignment == PlaneAlignment.HorizontalUp) || (alignment == PlaneAlignment.HorizontalDown); } /// /// Determines whether the plane is vertical. /// /// The being extended. /// true if the plane is vertical. public static bool IsVertical(this PlaneAlignment alignment) { return (alignment == PlaneAlignment.Vertical); } } }