using System; namespace UnityEngine.XR.ARSubsystems { /// /// Indicates the semantic classification of the plane. /// /// [Obsolete("PlaneClassification has been deprecated in AR Foundation version 6.0. Use PlaneClassifications instead.")] public enum PlaneClassification { /// /// The plane does not match any available classification. /// None = 0, /// /// The plane is classified as a wall. /// Wall, /// /// The plane is classified as the floor. /// Floor, /// /// The plane is classified as the ceiling. /// Ceiling, /// /// The plane is classified as a table. /// Table, /// /// The plane is classified as a seat. /// Seat, /// /// The plane is classified as a door. /// Door, /// /// The plane is classified as a window. /// Window, /// /// The plane is classified as other. /// Other = int.MaxValue, } /// /// Utility methods for converting between and values. These methods will be removed once the deprecated `PlaneClassification` enumeration is removed. /// [Obsolete("PlaneClassification has been deprecated in AR Foundation version 6.0. Use PlaneClassifications instead.")] public static class PlaneClassificationExtensions { /// /// Converts from to . /// /// The being extended. /// The to be converted. public static void ConvertFromPlaneClassifications(this PlaneClassification self, PlaneClassifications classifications) { if (classifications.HasFlag(PlaneClassifications.None)) { self = PlaneClassification.None; return; } if (classifications.HasFlag(PlaneClassifications.WallFace)) { self = PlaneClassification.Wall; return; } if (classifications.HasFlag(PlaneClassifications.Floor)) { self = PlaneClassification.Floor; return; } if (classifications.HasFlag(PlaneClassifications.Ceiling)) { self = PlaneClassification.Ceiling; return; } if (classifications.HasFlag(PlaneClassifications.Table)) { self = PlaneClassification.Table; return; } if (classifications.HasFlag(PlaneClassifications.Couch)) { self = PlaneClassification.Seat; return; } if (classifications.HasFlag(PlaneClassifications.DoorFrame)) { self = PlaneClassification.Door; return; } if (classifications.HasFlag(PlaneClassifications.WindowFrame)) { self = PlaneClassification.Window; return; } if (classifications.HasFlag(PlaneClassifications.Other)) { self = PlaneClassification.Other; return; } self = PlaneClassification.Other; } /// /// Converts from to . /// /// The being extended. /// The converted value flags. public static PlaneClassifications ConvertToPlaneClassifications(this PlaneClassification self) { switch (self) { case PlaneClassification.None: return PlaneClassifications.None; case PlaneClassification.Wall: return PlaneClassifications.WallFace; case PlaneClassification.Floor: return PlaneClassifications.Floor; case PlaneClassification.Ceiling: return PlaneClassifications.Ceiling; case PlaneClassification.Table: return PlaneClassifications.Table; case PlaneClassification.Seat: return PlaneClassifications.Seat; case PlaneClassification.Door: return PlaneClassifications.DoorFrame; case PlaneClassification.Window: return PlaneClassifications.WindowFrame; case PlaneClassification.Other: return PlaneClassifications.Other; default: return PlaneClassifications.Other; } } } }