@@ -27,6 +27,10 @@ extension ARCamera {
27
27
28
28
/** Tracking is limited due to a lack of features visible to the camera. */
29
29
case insufficientFeatures
30
+
31
+ /** Tracking is limited due to a relocalization in progress. */
32
+ @available ( iOS, introduced: 11.3 )
33
+ case relocalizing
30
34
}
31
35
32
36
/** Tracking is not available. */
@@ -49,10 +53,20 @@ extension ARCamera {
49
53
case . limited:
50
54
let reason : TrackingState . Reason
51
55
52
- switch __trackingStateReason {
53
- case . initializing: reason = . initializing
54
- case . excessiveMotion: reason = . excessiveMotion
55
- default : reason = . insufficientFeatures
56
+ if #available( iOS 11 . 3 , * ) {
57
+ switch __trackingStateReason {
58
+ case . initializing: reason = . initializing
59
+ case . relocalizing: reason = . relocalizing
60
+ case . excessiveMotion: reason = . excessiveMotion
61
+ default : reason = . insufficientFeatures
62
+ }
63
+ }
64
+ else {
65
+ switch __trackingStateReason {
66
+ case . initializing: reason = . initializing
67
+ case . excessiveMotion: reason = . excessiveMotion
68
+ default : reason = . insufficientFeatures
69
+ }
56
70
}
57
71
58
72
return . limited( reason)
@@ -105,3 +119,38 @@ extension ARFaceGeometry {
105
119
return Array ( buffer)
106
120
}
107
121
}
122
+
123
+ @available ( iOS, introduced: 11.3 )
124
+ extension ARPlaneGeometry {
125
+ /**
126
+ The mesh vertices of the geometry.
127
+ */
128
+ @nonobjc public var vertices : [ vector_float3 ] {
129
+ let buffer = UnsafeBufferPointer ( start: __vertices, count: Int ( __vertexCount) )
130
+ return Array ( buffer)
131
+ }
132
+
133
+ /**
134
+ The texture coordinates of the geometry.
135
+ */
136
+ @nonobjc public var textureCoordinates : [ vector_float2 ] {
137
+ let buffer = UnsafeBufferPointer ( start: __textureCoordinates, count: Int ( __textureCoordinateCount) )
138
+ return Array ( buffer)
139
+ }
140
+
141
+ /**
142
+ The triangle indices of the geometry.
143
+ */
144
+ @nonobjc public var triangleIndices : [ Int16 ] {
145
+ let buffer = UnsafeBufferPointer ( start: __triangleIndices, count: Int ( triangleCount * 3 ) )
146
+ return Array ( buffer)
147
+ }
148
+
149
+ /**
150
+ The vertices of the geometry's outermost boundary.
151
+ */
152
+ @nonobjc public var boundaryVertices : [ vector_float3 ] {
153
+ let buffer = UnsafeBufferPointer ( start: __boundaryVertices, count: Int ( __boundaryVertexCount) )
154
+ return Array ( buffer)
155
+ }
156
+ }
0 commit comments