39 #import <Foundation/Foundation.h> 41 #include <TargetConditionals.h> 44 #import <UIKit/UIKit.h> 47 #import <Metal/Metal.h> 48 #import <CoreImage/CoreImage.h> 84 float _InitInlierRatio;
85 int _InitNumOfCorresp;
86 float _TrackingInlierRatio;
87 int _TrackingNumOfCorresp;
89 int _NumberOfPatternRecognitions;
90 int _NumberOfTemplates;
91 int _NumberOfTemplatesDynamic;
92 int _NumberOfTemplatesStatic;
93 int _NumberOfLineModels;
94 float _AutoInitSetupProgress;
95 int _TrackingImageWidth;
96 int _TrackingImageHeight;
104 NSString* _WorldMappingStatus;
110 NSArray<vlTrackingObjectState*>* objects;
111 NSArray<vlTrackingDeviceState*>* inputs;
154 - (NSString * _Nullable)toString;
157 FOUNDATION_EXPORT VL_SDK_API
@interface VLIssue:NSObject {
165 FOUNDATION_EXPORT VL_SDK_API
@interface VLIssues:NSObject {
167 NSArray<VLIssue *> *issues;
170 -(BOOL)hasCode:(
int)code;
181 FOUNDATION_EXPORT VL_SDK_API
@protocol vlFrameListenerInterface <NSObject>
193 -(NSMutableData * _Nonnull )onGetDebugImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
203 -(void)onRawDebugImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
211 -(void)onMetalDebugImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
219 -(void)onCGDebugImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
230 -(NSMutableData * _Nonnull )onGetImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
240 -(void)onRawImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
248 -(void)onMetalImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
256 -(void)onCGImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
265 -(void)onTrackerInitialized:(
bool)worked;
275 -(void)onIssuesTriggered:(
VLIssues* _Nullable)warnings andErrors:(
VLIssues* _Nullable)errors;
282 -(void)onExtrinsicData:(
float * _Nonnull)data isValid:(
bool)valid;
288 -(void)onIntrinsicData:(
float * _Nonnull)data;
299 -(void)onIntrinsicDataWithWidth:(
float)width height:(
float)height cx:(
float)cx cy:(
float)cy fx:(
float)fx fy:(
float)fy;
307 -(void)onLog:(NSString * _Nonnull)logString;
313 -(void)onTrackingPaused:(BOOL)worked;
318 -(void)onSteppedFrame;
346 -(void)onInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
351 -(void)onInitPoseMatrix:(
float * _Nonnull)m;
357 -(void)onResetTracking:(BOOL)hard;
366 -(void) onCalibrationResults:(NSString * _Nullable)json;
374 -(void) onGetAttribute:(NSString *_Nonnull)name withValue:(NSString *_Nonnull)value;
378 -(void)onModelRemoved:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
379 -(void)onRawModelAdded:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
387 FOUNDATION_EXPORT VL_SDK_API
@interface vlSDK : NSObject {
396 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(
id _Nullable)delegate __attribute((deprecated("Use functions that also set licensePath or licenseData")));
405 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicensePath:(NSString* _Nonnull)licensePath andDelegate:(
id _Nullable)delegate;
414 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicenseData:(NSString* _Nonnull)licenseData andDelegate:(
id _Nullable)delegate;
425 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options __attribute((deprecated("Use functions that also set licensePath or licenseData")));
437 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicensePath:(NSString* _Nonnull)licensePath andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options;
449 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andLicenseData:(NSString* _Nonnull)licenseData andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options;
487 -(void) pause:(BOOL)enable;
506 -(void) setDeviceOrientation:(UIDeviceOrientation)orientation withWidth:(
int)width andHeight:(
int)height;
512 -(void) windowResized:(CGSize)size;
520 -(void) setLogLevel:(
int)level;
526 -(void) setFPS:(
unsigned int)fps;
534 -(void) setNearPlane:(
float)near andFarPlane:(
float)far;
541 -(void) setInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
547 -(void) setInitPoseFromMatrix:(
float * _Nonnull)m;
555 -(void) configureExtrinsicCameraInverted:(BOOL)invert;
579 -(BOOL) getLastExtrinsic:(
float * _Nonnull)m;
586 -(void) applyInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(
float)angle;
594 -(void) getInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(
float* _Nonnull)angle;
602 -(BOOL) enableDebugImage;
607 -(BOOL) disableDebugImage;
613 -(void)startAlignInitPoseWithSensor;
618 -(void)stopAlignInitPoseWithSensor;
626 -(UIImage * _Nullable)getLastImage;
632 -(NSImage * _Nullable) getLastImage;
642 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withFloatValue:(
float)value;
650 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withStringValue:(NSString * _Nonnull)value;
657 -(void)getAttributeRequest:(NSString * _Nonnull)attribute;
665 -(void)setCalibrationCommand:(NSString * _Nonnull)command;
672 -(void)writeCalibrationDB:(NSString * _Nonnull)uri;
680 -(NSString * _Nullable)getTrackerType;
688 -(NSString * _Nullable)getDeviceType;
701 -(void)writeInitData:(NSString *_Nonnull)uri;
713 -(void)readInitData:(NSString *_Nonnull)uri;
718 -(void)resetInitData;
724 -(void)setModel:(NSString *_Nonnull)name property:(NSString *_Nonnull)property state:(
bool)enable;
731 -(void)requestModelProperties;
736 -(void)requestModelData:(NSString*_Nonnull)name withOptions:(NSString *_Nonnull)options;
742 -(void)removeModel:(NSString*_Nonnull)nameURI;
780 -(BOOL)addRawModelWithStruct:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
783 -(void)pushJsonAndBinaryCommand:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
784 -(void)pushJsonCommand:(NSString *_Nonnull)json;
785 -(void)writeLineModelData:(NSString *_Nonnull)uri;
786 -(void)readLineModelData:(NSString *_Nonnull)uri;
int subMeshCount
Stats of the model regarding the number of mehes.
Definition: vlSDK_Apple.h:141
NSString * modelHash
The model hash code for licensing of the model.
Definition: vlSDK_Apple.h:129
bool enabled
If the model is expected to be shown.
Definition: vlSDK_Apple.h:126
Definition: vlSDK_Apple.h:101
Definition: vlSDK_Apple.h:157
bool occluder
If the model will occlude other parts as an invisible part.
Definition: vlSDK_Apple.h:138
Definition: vlSDK_Apple.h:108
Convenient function for using the vlSDK in a simple manner. The vlSDK wrapper uses the C-Interface a...
Definition: vlSDK_Apple.h:387
NSString * name
The name which has either been automatically assigned, or is coming from the model definitions...
Definition: vlSDK_Apple.h:132
int triangleCount
Stats of the model regarding the number of triangles used.
Definition: vlSDK_Apple.h:144
Definition: vlSDK_Apple.h:165
NSString * uri
The URI of the object that has been referenced.
Definition: vlSDK_Apple.h:135
Definition: vlSDK_Apple.h:79
Properties of models managed by the visionlib. The model properties can be queried by calling request...
Definition: vlSDK_Apple.h:122