#if (defined(USE_ARKIT_PUBLIC_HEADERS) && USE_ARKIT_PUBLIC_HEADERS) || !__has_include() // // ARReferenceImage.h // ARKit // // Copyright © 2016-2021 Apple Inc. All rights reserved. // #import #import #import #import @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 *)referenceImagesInGroupNamed:(NSString *)name bundle:(nullable NSBundle *)bundle; /** Unavailable */ - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END #else #import #endif // #if (defined(USE_ARKIT_PUBLIC_HEADERS) \&\& USE_ARKIT_PUBLIC_HEADERS) || !__has_include()