-
Notifications
You must be signed in to change notification settings - Fork 0
/
ARKit.framework.h
3550 lines (2789 loc) · 121 KB
/
ARKit.framework.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ========== ARKit.framework/Headers/ARMatteGenerator.h
//
// ARMatteGenerator.h
// ARKit
//
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@class ARFrame;
@protocol MTLTexture;
@protocol MTLCommandBuffer;
@protocol MTLDevice;
NS_ASSUME_NONNULL_BEGIN
/**
The resolution at which the matte is to be generated.
@discussion The matte generated per frame can be full resolution of the captured camera image or half resolution. The caller chooses one of the options from ARMatteResolution during initialization.
*/
typedef NS_ENUM(NSInteger, ARMatteResolution) {
/* Matte generated at camera image resolution. */
ARMatteResolutionFull = 0,
/* Matte generated at half the camera image resolution. */
ARMatteResolutionHalf = 1
} NS_SWIFT_NAME(ARMatteGenerator.Resolution);
/**
An object designed to generate either full resolution or half resolution matte given the ARFrame.
@discussion The caller initializes the object once and calls the alpha matte generation API for every ARFrame with the captured image and segmentation stencil.
*/
@interface ARMatteGenerator : NSObject
/**
Initializes an instance of ARMatteGenerator.
@discussion For efficient creation of alpha mattes in real time it is recommended to instantiate this object only once and to generate an alpha matte for every incoming frame.
@see ARFrame
@see -[ARMatteGenerator generateMatteFromFrame:commandBuffer:]
@param device The device the filter will run on.
@param matteResolution The resolution at which the matte is to be generated. Set using one of the values from 'ARMatteResolution'.
@see ARMatteResolution
@return Instance of ARMatteGenerator.
*/
- (instancetype)initWithDevice:(id <MTLDevice>)device matteResolution:(ARMatteResolution)matteResolution NS_DESIGNATED_INITIALIZER;
/**
Generates alpha matte at either full resolution or half the resolution of the captured image.
@param frame Current ARFrame containing camera image and segmentation stencil. The caller is to ensure that a valid segmentation buffer is present.
@param commandBuffer Metal command buffer for encoding matting related operations. The command buffer is committed by the caller externally.
@return Alpha matte MTLTexture for the given ARFrame at full resolution or half resolution as chosen by the caller during initialization.
*/
- (id <MTLTexture>)generateMatteFromFrame:(ARFrame*)frame commandBuffer:(id <MTLCommandBuffer>)commandBuffer;
/**
Generates dilated depth at the resolution of the segmentation stencil.
@discussion The caller can use depth information when compositing a virtual object with the captured scene. This API returns the dilated linear depth to the caller. The reprojection of this depth to the caller's scene space is carried out externally.
@param frame Current ARFrame containing camera image and estimated depth buffer. The caller is to ensure that a valid depth buffer is present.
@param commandBuffer Metal command buffer for encoding depth dilation operations. The command buffer is committed by the caller externally.
@return Dilated depth MTLTexture for the given ARFrame at the segmentation stencil resolution. The texture consists of a single channel and is of type float32.
*/
- (id <MTLTexture>)generateDilatedDepthFromFrame:(ARFrame*)frame commandBuffer:(id <MTLCommandBuffer>)commandBuffer;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARBody2D.h
//
// ARBody2D.h
// ARKit
//
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <ARKit/ARSkeleton.h>
#import <simd/simd.h>
NS_ASSUME_NONNULL_BEGIN
/**
Representation of a body in 2D.
*/
API_AVAILABLE(ios(13.0))
@interface ARBody2D : NSObject
/**
The body's skeleton.
*/
@property (nonatomic, readonly) ARSkeleton2D *skeleton;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARCollaborationData.h
//
// ARCollaborationData.h
// ARKit
//
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <ARKit/ARSession.h>
NS_ASSUME_NONNULL_BEGIN
/**
Object representing data for collaborative session.
@discussion This data needs to be sent to each participants in the collaborative session.
*/
API_AVAILABLE(ios(13.0))
NS_SWIFT_NAME(ARSession.CollaborationData)
@interface ARCollaborationData : NSObject
/**
Data representation of the object.
@discussion The data representation should be sent to other participants in the collaborative session.
*/
@property (nonatomic, readonly) NSData *data;
/**
Initialize from data representation.
@discussion This data is recieved from other participants in the collaborative session.
@param data Data representation.
*/
- (instancetype)initWithData:(NSData *)data;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARSkeleton.h
//
// ARSkeleton.h
// ARKit
//
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <ARKit/ARSkeletonDefinition.h>
#import <simd/simd.h>
NS_ASSUME_NONNULL_BEGIN
/**
An object representing a skeleton.
@discussion A skeleton's structure is defined by a skeleton definition.
@see ARSkeletonDefinition
*/
API_AVAILABLE(ios(13.0))
@interface ARSkeleton : NSObject
/**
Skeleton definition.
*/
@property (nonatomic, readonly) ARSkeletonDefinition *definition;
/**
The number of joints.
*/
@property (nonatomic, readonly) NSUInteger jointCount NS_REFINED_FOR_SWIFT;
/**
Tracking state for a given joint.
@param jointIndex The index of the joint.
@return True if the joint is tracked. False otherwise.
*/
- (BOOL)isJointTracked:(NSInteger)jointIndex;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
/**
An object representing a skeleton in 3D.
*/
API_AVAILABLE(ios(13.0))
@interface ARSkeleton3D : ARSkeleton
/**
The model space transforms for each joint.
*/
@property (nonatomic, readonly) const simd_float4x4 *jointModelTransforms NS_REFINED_FOR_SWIFT;
/**
The local space joint data for each joint.
*/
@property (nonatomic, readonly) const simd_float4x4 *jointLocalTransforms NS_REFINED_FOR_SWIFT;
/**
Returns the model transform for a joint with a given name.
@discussion If an invalid joint name is passed the returned matrix will be filled with NaN values.
@param jointName The name of the joint.
@return Model transform
*/
- (simd_float4x4)modelTransformForJointName:(ARSkeletonJointName)jointName NS_REFINED_FOR_SWIFT;
/**
Returns the local transform for a joint with a given name.
@discussion If an invalid joint name is passed the returned matrix will be filled with NaN values.
@param jointName The name of the joint.
@return Local transform
*/
- (simd_float4x4)localTransformForJointName:(ARSkeletonJointName)jointName NS_REFINED_FOR_SWIFT;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
/**
An object representing a skeleton in 2D.
*/
API_AVAILABLE(ios(13.0))
@interface ARSkeleton2D : ARSkeleton
/**
The joint landmarks in normalized coordinates.
@discussion The joint landmarks are detected in the captured image on the ARFrame.
@see -[ARFrame capturedImage]
*/
@property (nonatomic, readonly) const simd_float2 *jointLandmarks NS_REFINED_FOR_SWIFT;
/**
Returns the landmark point for a joint with a given name.
@discussion If an invalid joint name is passed the returned point will be filled with NaN values.
@param jointName The name of the joint.
@return Landmark in normalized image coordinates.
*/
- (simd_float2)landmarkForJointNamed:(ARSkeletonJointName)jointName NS_REFINED_FOR_SWIFT;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARLightEstimate.h
//
// ARLightEstimate.h
// ARKit
//
// Copyright © 2016-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <simd/simd.h>
NS_ASSUME_NONNULL_BEGIN
/**
A light estimate representing the light in the scene.
*/
API_AVAILABLE(ios(11.0))
@interface ARLightEstimate : NSObject
/**
Ambient intensity of the lighting.
@discussion In a well lit environment, this value is close to 1000. It typically ranges from 0 (very dark) to around 2000 (very bright).
*/
@property (nonatomic, readonly) CGFloat ambientIntensity;
/**
The ambient color temperature of the lighting.
@discussion This specifies the ambient color temperature of the lighting in Kelvin (6500 corresponds to pure white).
*/
@property (nonatomic, readonly) CGFloat ambientColorTemperature;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
/**
A directional light estimate representing the light intensity and direction in the scene.
*/
API_AVAILABLE(ios(11.0))
@interface ARDirectionalLightEstimate : ARLightEstimate
/**
Second degree spherical harmonics coefficients representing the intensity of light.
@discussion The data is an array of 27 32-bit floating-point values, containing three non-interleaved data sets
corresponding to the red, green, and blue sets of coefficients.
*/
@property (nonatomic, copy, readonly) NSData *sphericalHarmonicsCoefficients;
/**
The primary direction of light.
*/
@property (nonatomic, readonly) simd_float3 primaryLightDirection;
/**
The intensity of light in the primary direction.
*/
@property (nonatomic, readonly) CGFloat primaryLightIntensity;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARFaceAnchor.h
//
// ARFaceAnchor.h
// ARKit
//
// Copyright © 2016-2017 Apple Inc. All rights reserved.
//
#import <ARKit/ARAnchor.h>
#import <CoreGraphics/CoreGraphics.h>
NS_ASSUME_NONNULL_BEGIN
/**
Blend shape locations of a face geometry.
@discussion Each location defines an area of the face that can be displaced with a provided coefficient.
*/
typedef NSString *ARBlendShapeLocation NS_STRING_ENUM NS_SWIFT_NAME(ARFaceAnchor.BlendShapeLocation) API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationBrowDownLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationBrowDownRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationBrowInnerUp API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationBrowOuterUpLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationBrowOuterUpRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationCheekPuff API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationCheekSquintLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationCheekSquintRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeBlinkLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeBlinkRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookDownLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookDownRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookInLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookInRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookOutLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookOutRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookUpLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeLookUpRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeSquintLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeSquintRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeWideLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationEyeWideRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationJawForward API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationJawLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationJawOpen API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationJawRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthClose API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthDimpleLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthDimpleRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthFrownLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthFrownRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthFunnel API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthLowerDownLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthLowerDownRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthPressLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthPressRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthPucker API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthRollLower API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthRollUpper API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthShrugLower API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthShrugUpper API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthSmileLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthSmileRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthStretchLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthStretchRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthUpperUpLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationMouthUpperUpRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationNoseSneerLeft API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationNoseSneerRight API_AVAILABLE(ios(11.0));
FOUNDATION_EXTERN ARBlendShapeLocation const ARBlendShapeLocationTongueOut API_AVAILABLE(ios(12.0));
@class ARFaceGeometry;
/**
An anchor representing a face and its geometry.
*/
API_AVAILABLE(ios(11.0))
@interface ARFaceAnchor : ARAnchor <ARTrackable>
/**
The face geometry updated based on the computed blend shapes.
*/
@property (nonatomic, readonly) ARFaceGeometry *geometry;
/**
The left eye’s rotation and translation relative to the anchor’s origin.
*/
@property (nonatomic, readonly) simd_float4x4 leftEyeTransform API_AVAILABLE(ios(12.0));
/**
The right eye’s rotation and translation relative to the anchor’s origin.
*/
@property (nonatomic, readonly) simd_float4x4 rightEyeTransform API_AVAILABLE(ios(12.0));
/**
Look-at point relative to the anchor’s origin.
*/
@property (nonatomic, readonly) simd_float3 lookAtPoint API_AVAILABLE(ios(12.0));
/**
A dictionary of blend shape coefficients for each blend shape location.
@discussion Blend shapes coefficients define the amount of displacement of a neutral shape at a specific location on the face.
*/
@property (nonatomic, readonly) NSDictionary<ARBlendShapeLocation, NSNumber*> *blendShapes;
/** Unavailable */
- (instancetype)initWithTransform:(simd_float4x4)transform NS_UNAVAILABLE;
- (instancetype)initWithName:(NSString *)name transform:(simd_float4x4)transform NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARSKView.h
//
// ARSKView.h
// ARKit
//
// Copyright © 2017 Apple Inc. All rights reserved.
//
#import <SpriteKit/SpriteKit.h>
#import <ARKit/ARSession.h>
#import <ARKit/ARHitTestResult.h>
NS_ASSUME_NONNULL_BEGIN
@class ARSKView;
#pragma mark ARSKViewDelegate
API_AVAILABLE(ios(11.0))
@protocol ARSKViewDelegate <SKViewDelegate, ARSessionObserver>
@optional
/**
Implement this to provide a custom node for the given anchor.
@discussion This node will automatically be added to the scene graph.
If this method is not implemented, a node will be automatically created.
If nil is returned the anchor will be ignored.
@param view The view that will render the scene.
@param anchor The added anchor.
@return Node that will be mapped to the anchor or nil.
*/
- (nullable SKNode *)view:(ARSKView *)view nodeForAnchor:(ARAnchor *)anchor;
/**
Called when a new node has been mapped to the given anchor.
@param view The view that will render the scene.
@param node The node that maps to the anchor.
@param anchor The added anchor.
*/
- (void)view:(ARSKView *)view didAddNode:(SKNode *)node forAnchor:(ARAnchor *)anchor;
/**
Called when a node will be updated with data from the given anchor.
@param view The view that will render the scene.
@param node The node that will be updated.
@param anchor The anchor that was updated.
*/
- (void)view:(ARSKView *)view willUpdateNode:(SKNode *)node forAnchor:(ARAnchor *)anchor;
/**
Called when a node has been updated with data from the given anchor.
@param view The view that will render the scene.
@param node The node that was updated.
@param anchor The anchor that was updated.
*/
- (void)view:(ARSKView *)view didUpdateNode:(SKNode *)node forAnchor:(ARAnchor *)anchor;
/**
Called when a mapped node has been removed from the scene graph for the given anchor.
@param view The view that will render the scene.
@param node The node that was removed.
@param anchor The anchor that was removed.
*/
- (void)view:(ARSKView *)view didRemoveNode:(SKNode *)node forAnchor:(ARAnchor *)anchor;
@end
#pragma mark ARSKView
/**
A view that integrates ARSession rendering into SpriteKit.
@discussion The view draws the camera background, and projects and maps anchors to nodes.
*/
API_AVAILABLE(ios(11.0))
@interface ARSKView : SKView<ARSessionProviding>
/**
Specifies the view’s delegate.
*/
@property (nonatomic, weak, nullable) NSObject <ARSKViewDelegate> *delegate;
/**
The session that the view uses to update the view.
*/
@property (nonatomic, strong) ARSession *session;
/**
Searches the scene hierarchy for an anchor associated with the provided node.
@param node A node in the view’s scene.
*/
- (nullable ARAnchor *)anchorForNode:(SKNode *)node;
/**
Returns the node that has been mapped to a specific anchor.
@param anchor An anchor with an existing node mapping.
*/
- (nullable SKNode *)nodeForAnchor:(ARAnchor *)anchor;
/**
Searches the current frame for objects corresponding to a point in the view.
@discussion A 2D point in the view’s coordinate space can refer to any point along a line segment
in the 3D coordinate space. Hit-testing is the process of finding objects in the world located along this line segment.
@param point A point in the view’s coordinate system.
@param types The types of results to search for.
@return An array of all hit-test results sorted from nearest to farthest.
*/
- (NSArray<ARHitTestResult *> *)hitTest:(CGPoint)point types:(ARHitTestResultType)types;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARQuickLookPreviewItem.h
//
// ARQuickLookPreviewItem.h
// ARKit
//
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <QuickLook/QLPreviewItem.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(ios(13.0))
@interface ARQuickLookPreviewItem : NSObject <QLPreviewItem>
/**
Creates an object representing the 3D content that will be previewed in AR Quick Look.
@discussion This object will be previewed in AR Quick Look using the default
behavior:
- Start in Object mode without camera passthrough
- Display the Share button for 3D content sharing
- Allow scaling content in both Object and AR mode
This is a promise to the ARQuickLookPreviewItem class that the URL points to a 3D content file. This class does not deal with the file's existence or content, and leaves it up to QuickLook to handle and process the URL.
@param url A file URL to 3D content file (e.g. usdz).
@return The preview object to display in AR Quick Look.
*/
- (instancetype)initWithFileAtURL:(NSURL *)url NS_DESIGNATED_INITIALIZER;
/**
An optional canonical web page URL for the 3D content that will be shared.
@discussion If this is supplied, the URL to the canonical web page is shared instead of the 3D content file.
For example, providing https://developer.apple.com/arkit/gallery/ as the canonical web page URL string will be shared via the Share button. If the web page URL string is malformed or not provided, then AR Quick Look will default to sharing the 3D content.
*/
@property (nonatomic, strong, nullable) NSURL *canonicalWebPageURL;
/**
Whether or not AR Quick Look allows content scaling in AR mode.
Defaults to `YES` which allows scaling content in AR mode.
*/
@property (nonatomic, assign) BOOL allowsContentScaling;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARHitTestResult.h
//
// ARHitTestResult.h
// ARKit
//
// Copyright © 2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CGGeometry.h>
#import <simd/simd.h>
@class ARAnchor;
/**
Option set of hit-test result types.
*/
API_AVAILABLE(ios(11.0))
typedef NS_OPTIONS(NSUInteger, ARHitTestResultType) {
/** Result type from intersecting the nearest feature point. */
ARHitTestResultTypeFeaturePoint = (1 << 0),
/** Result type from intersecting a horizontal plane estimate, determined for the current frame. */
ARHitTestResultTypeEstimatedHorizontalPlane = (1 << 1),
/** Result type from intersecting a vertical plane estimate, determined for the current frame. */
ARHitTestResultTypeEstimatedVerticalPlane API_AVAILABLE(ios(11.3)) = (1 << 2),
/** Result type from intersecting with an existing plane anchor. */
ARHitTestResultTypeExistingPlane = (1 << 3),
/** Result type from intersecting with an existing plane anchor, taking into account the plane’s extent. */
ARHitTestResultTypeExistingPlaneUsingExtent = (1 << 4),
/** Result type from intersecting with an existing plane anchor, taking into account the plane’s geometry. */
ARHitTestResultTypeExistingPlaneUsingGeometry API_AVAILABLE(ios(11.3)) = (1 << 5),
} NS_SWIFT_NAME(ARHitTestResult.ResultType);
NS_ASSUME_NONNULL_BEGIN
/**
A result of an intersection found during a hit-test.
*/
API_AVAILABLE(ios(11.0))
@interface ARHitTestResult : NSObject
/**
The type of the hit-test result.
*/
@property (nonatomic, readonly) ARHitTestResultType type;
/**
The distance from the camera to the intersection in meters.
*/
@property (nonatomic, readonly) CGFloat distance;
/**
The transformation matrix that defines the intersection’s rotation, translation and scale
relative to the anchor or nearest feature point.
*/
@property (nonatomic, readonly) simd_float4x4 localTransform;
/**
The transformation matrix that defines the intersection’s rotation, translation and scale
relative to the world.
*/
@property (nonatomic, readonly) simd_float4x4 worldTransform;
/**
The anchor that the hit-test intersected.
@discussion An anchor will only be provided for existing plane result types.
*/
@property (nonatomic, strong, nullable, readonly) ARAnchor *anchor;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARTrackedRaycast.h
//
// ARTrackedRaycast.h
// ARKit
//
// Copyright © 2018 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <simd/simd.h>
#import "ARRaycastQuery.h"
NS_ASSUME_NONNULL_BEGIN
/**
A tracked raycast representation.
*/
API_AVAILABLE(ios(13.0))
@interface ARTrackedRaycast: NSObject
/**
Update the raycast query.
@discussion If raycast of the new query fails, an empty result is sent to the update handler and the query's ray will be no longer tracked.
*/
- (void)updateQuery:(ARRaycastQuery *)query;
/**
Stop raycasting.
@discussion The raycast will be continuously tracked until stopped.
Resetting session's tracking, changing its configuration or deallocation of ARTrackedRaycast object cause the raycast to stop.
*/
- (void)stopTracking;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARRaycastQuery.h
//
// ARRaycastQuery.h
// ARKit
//
// Copyright © 2018 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <simd/simd.h>
NS_ASSUME_NONNULL_BEGIN
/**
A value describing the target of a ray used for raycasting.
*/
API_AVAILABLE(ios(13.0))
typedef NS_ENUM(NSInteger, ARRaycastTarget) {
/** Ray's target is an already detected plane, considering the plane's estimated size and shape. */
ARRaycastTargetExistingPlaneGeometry,
/** Ray's target is an already detected plane, without considering the plane's size. */
ARRaycastTargetExistingPlaneInfinite,
/**
Ray's target is a plane that is estimated using the feature points around the ray.
When alignment is ARRaycastTargetAlignmentAny, alignment of estimated planes is based on the normal of the real world
surface corresponding to the estimated plane.
*/
ARRaycastTargetEstimatedPlane,
} NS_SWIFT_NAME(ARRaycastQuery.Target);
/**
A value describing the alignment of a target.
*/
API_AVAILABLE(ios(13.0))
typedef NS_ENUM(NSInteger, ARRaycastTargetAlignment) {
/** A target that is horizontal with respect to gravity. */
ARRaycastTargetAlignmentHorizontal,
/** A target that is vertical with respect to gravity. */
ARRaycastTargetAlignmentVertical,
/** A target that is in any alignment, inclusive of horizontal and vertical. */
ARRaycastTargetAlignmentAny
} NS_SWIFT_NAME(ARRaycastQuery.TargetAlignment);
/**
Representation of a ray and its target which is used for raycasting.
@discussion Represents a 3D ray and its target which is used to perform raycasting.
*/
API_AVAILABLE(ios(13.0))
@interface ARRaycastQuery : NSObject
/**
Origin of the ray.
*/
@property (nonatomic, readonly) simd_float3 origin;
/**
Direction of the ray.
*/
@property (nonatomic, readonly) simd_float3 direction;
/**
Type of target where the ray should terminate.
*/
@property (nonatomic, readonly) ARRaycastTarget target;
/**
The alignment of the target that should be considered for raycasting.
*/
@property (nonatomic, readonly) ARRaycastTargetAlignment targetAlignment;
/**
Create a new ARRaycastQuery with the provided origin, direction, allowed target and its alignment.
@param origin Origin of the ray.
@param direction Direction of the ray.
@param target Type of target where the ray is allowed to terminate.
@param alignment Alignment of the target that should be considered for raycasting.
*/
- (instancetype)initWithOrigin:(simd_float3)origin direction:(simd_float3)direction allowingTarget:(ARRaycastTarget)target alignment:(ARRaycastTargetAlignment)alignment;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARParticipantAnchor.h
//
// ARParticipantAnchor.h
// ARKit
//
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <ARKit/ARAnchor.h>
NS_ASSUME_NONNULL_BEGIN
/**
This anchor represents the physical position and orientation of another participant in the collaborative session.
@discussion The participant anchors are automatically added to the ARSession and are updated with each frame.
The participant can be identified by `sessionIdentifier` property of the anchor.
*/
API_AVAILABLE(ios(13.0))
@interface ARParticipantAnchor : ARAnchor
/** Unavailable */
- (instancetype)initWithTransform:(simd_float4x4)transform NS_UNAVAILABLE;
- (instancetype)initWithName:(NSString *)name transform:(simd_float4x4)transform NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARBodyAnchor.h
//
// ARBodyAnchor.h
// ARKit
//
// Copyright © 2019 Apple Inc. All rights reserved.
//
#import <ARKit/ARAnchor.h>
#import <CoreGraphics/CGGeometry.h>
NS_ASSUME_NONNULL_BEGIN
@class ARBody2D;
@class ARSkeleton3D;
/**
An anchor representing a body in the world.
*/
API_AVAILABLE(ios(13.0))
@interface ARBodyAnchor : ARAnchor <ARTrackable>
/**
The tracked skeleton in 3D.
@note The default height of this skeleton is defined to be 1.8 meters.
*/
@property (nonatomic, strong, readonly) ARSkeleton3D *skeleton;
/**
The factor between estimated physical size and default size of the skeleton.
@see -[ARSkeletonDefinition neutralBodySkeleton3D]
@discussion This value will be estimated if automaticSkeletonScaleEstimationEnabled is set to true on the ARBodyTrackingConfiguration.
It is used to correct the transform's translation. Default value is 1.0.
*/
@property (nonatomic, readonly) CGFloat estimatedScaleFactor;
/** Unavailable */
- (instancetype)initWithTransform:(simd_float4x4)transform NS_UNAVAILABLE;
- (instancetype)initWithName:(NSString *)name transform:(simd_float4x4)transform NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARReferenceImage.h
//
// ARReferenceImage.h
// ARKit
//
// Copyright © 2016-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <ImageIO/CGImageProperties.h>
#import <CoreVideo/CVPixelBuffer.h>
@class CIImage;
NS_ASSUME_NONNULL_BEGIN
/**
A reference image to be detected in the scene.
*/
API_AVAILABLE(ios(11.3))
@interface ARReferenceImage : NSObject
/**
An optional name used to identify the image.
*/
@property (nonatomic, copy, nullable) NSString *name;
/**
The physical size of the image in meters.
*/
@property (nonatomic, readonly) CGSize physicalSize;
/**
The AR resource group name for this image.
@discussion If this image was loaded via an AR resource group in the Xcode asset catalogue this property will have the name of the resource group,
else be set to nil.
*/
@property (nonatomic, strong, nullable, readonly) NSString *resourceGroupName API_AVAILABLE(ios(13.0));
/**
Validate if this image can be used for image detection or tracking.
@discussion When loading reference images from the asset catalog this verification is not needed as the same verification happens
at compile time.
@param completionHandler Completion handler invoked when validation is done. The completion handler takes the following parameters:
error - An error that indicates why the image is not suitable for tracking, or nil if no error occured.
*/
- (void)validateWithCompletionHandler:(void (^)(NSError * _Nullable error))completionHandler API_AVAILABLE(ios(13.0));
/**
Creates a new reference image.
@param image The reference image as CGImage.
@param orientation The image orientation.
@param physicalWidth The width in meters of the physical object.
*/
- (instancetype)initWithCGImage:(CGImageRef)image orientation:(CGImagePropertyOrientation)orientation physicalWidth:(CGFloat)physicalWidth NS_SWIFT_NAME(init(_:orientation:physicalWidth:));
/**
Creates a new reference image.
@param pixelBuffer The reference image as CVPixelBuffer.
@param physicalWidth The width in meters of the physical object.
@param orientation The image orientation.
*/
- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer orientation:(CGImagePropertyOrientation)orientation physicalWidth:(CGFloat)physicalWidth NS_SWIFT_NAME(init(_:orientation:physicalWidth:));
/**
Returns the set of ARReferenceImages in the specified resource group and bundle.
@param name The name of the resource group.
@param bundle The bundle containing the image file or asset catalog. Specify nil to search the app’s main bundle.
@return The set of reference images or nil on error.
*/
+ (nullable NSSet<ARReferenceImage *> *)referenceImagesInGroupNamed:(NSString *)name bundle:(nullable NSBundle *)bundle;
/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== ARKit.framework/Headers/ARVideoFormat.h
//
// ARVideoFormat.h
// ARKit
//
// Copyright © 2016-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>