namespace UnityEngine.XR.ARSubsystems { /// /// Represents the alignment of a plane (for example, whether it is horizontal or vertical). /// /// public enum PlaneAlignment { /// /// No alignment. /// None = 0, /// /// The plane is horizontal with an upward facing normal (for example, a floor). /// HorizontalUp = 100, /// /// The plane is horizontal with a downward facing normal (for example, a ceiling). /// HorizontalDown = 101, /// /// The plane is vertical (for example, a wall). /// Vertical = 200, /// /// The plane is not aligned with any axis. /// 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); } } }