File tree Expand file tree Collapse file tree 2 files changed +61
-4
lines changed Expand file tree Collapse file tree 2 files changed +61
-4
lines changed Original file line number Diff line number Diff line change @@ -190,3 +190,60 @@ extension ARPlaneGeometry {
190190 return Array ( buffer)
191191 }
192192}
193+
194+ @available ( iOS, introduced: 12.0 )
195+ extension ARPlaneAnchor {
196+ /**
197+ A value describing the classification of a plane anchor.
198+ */
199+ public enum Classification {
200+
201+ public enum Status {
202+
203+ /** Plane classification is currently unavailable. */
204+ case notAvailable
205+
206+ /** ARKit has not yet determined the classification of this plane. */
207+ case undetermined
208+
209+ /** ARKit is confident the plane is not any of the known classes. */
210+ case unknown
211+ }
212+
213+ /** The classification is not any of the known classes. */
214+ case none( Status )
215+
216+ case wall
217+
218+ case floor
219+
220+ case ceiling
221+
222+ case table
223+
224+ case seat
225+ }
226+
227+
228+ /**
229+ Classification of the plane.
230+ */
231+ public var classification : ARPlaneAnchor . Classification {
232+ switch __classification {
233+ case . wall: return . wall
234+ case . floor: return . floor
235+ case . ceiling: return . ceiling
236+ case . table: return . table
237+ case . seat: return . seat
238+ case . none: fallthrough
239+ default :
240+ switch __classificationStatus {
241+ case . notAvailable: return . none( . notAvailable)
242+ case . unknown: return . none( . unknown)
243+ case . undetermined: fallthrough
244+ case . known: fallthrough
245+ default : return . none( . undetermined)
246+ }
247+ }
248+ }
249+ }
Original file line number Diff line number Diff line change @@ -156,14 +156,14 @@ extension MTLRenderCommandEncoder {
156156 public func useHeaps( _ heaps: [ MTLHeap ] ) {
157157 __use ( heaps, count: heaps. count)
158158 }
159-
160- #if os(macOS)
161- @available ( macOS 10 . 13 , * )
159+
160+ #if os(macOS) || os(iOS)
161+ @available ( macOS 10 . 13 , iOS 12 . 0 , * )
162162 public func setViewports( _ viewports: [ MTLViewport ] ) {
163163 __setViewports ( viewports, count: viewports. count)
164164 }
165165
166- @available ( macOS 10 . 13 , * )
166+ @available ( macOS 10 . 13 , iOS 12 . 0 , * )
167167 public func setScissorRects( _ scissorRects: [ MTLScissorRect ] ) {
168168 __setScissorRects ( scissorRects, count: scissorRects. count)
169169 }
You can’t perform that action at this time.
0 commit comments