37 #import <Foundation/Foundation.h> 38 #if defined(__arm__) || defined(__arm64__) 39 #define vlSDKFOR_IPHONE 42 #ifdef vlSDKFOR_IPHONE 43 #import <UIKit/UIKit.h> 46 #import <Metal/Metal.h> 47 #import <CoreImage/CoreImage.h> 119 - (NSString *)toString;
136 -(BOOL)hasCode:(
int)code;
147 FOUNDATION_EXPORT
@protocol vlFrameListenerInterface <NSObject>
159 -(NSMutableData * _Nonnull )onGetDebugImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
169 -(void)onRawDebugImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
177 -(void)onMetalDebugImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
185 -(void)onCGDebugImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
196 -(NSMutableData * _Nonnull )onGetImageBufferWithWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
206 -(void)onRawImageBuffer:(NSData * _Nonnull)data withWidth:(
int)width andHeight:(
int)height andBytesPerPixel:(
int)bytesPerPixel;
216 -(void)onMetalImageTexture:(_Nonnull
id<MTLTexture>)texture withRotationMatrix:(
float * _Nonnull)m;
226 -(void)onCGImageRef:(CGImageRef _Nonnull)texture withRotationMatrix:(
float * _Nonnull)m;
235 -(void)onTrackerInitialized:(
bool)worked;
252 -(void)onExtrinsicData:(
float * _Nonnull)data isValid:(
bool)valid;
258 -(void)onIntrinsicData:(
float * _Nonnull)data;
269 -(void)onIntrinsicDataWithWidth:(
float)width height:(
float)height cx:(
float)cx cy:(
float)cy fx:(
float)fx fy:(
float)fy;
277 -(void)onLog:(NSString * _Nonnull)logString;
283 -(void)onTrackingPaused:(BOOL)worked;
288 -(void)onSteppedFrame;
311 -(void)onTrackingInformation:(NSDictionary* _Nonnull)info;
316 -(void)onInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
321 -(void)onInitPoseMatrix:(
float * _Nonnull)m;
327 -(void)onResetTracking:(BOOL)hard;
336 -(void) onCalibrationResults:(NSString * _Nullable)json;
344 -(void) onGetAttribute:(NSString *_Nonnull)name withValue:(NSString *_Nonnull)value;
348 -(void)onModelRemoved:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
349 -(void)onRawModelAdded:(NSString * _Nullable)json withError:(NSString * _Nullable)errorJson;
357 FOUNDATION_EXPORT
@interface vlSDK : NSObject {
366 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(
id _Nullable)delegate;
382 -(
id _Nonnull) initTrackerWithURI:(NSString* _Nonnull)uri andDelegate:(_Nullable
id)delegate withOptions:(NSDictionary * _Nullable)options;
420 -(void) pause:(BOOL)enable;
433 #ifdef vlSDKFOR_IPHONE 439 -(void) setDeviceOrientation:(UIDeviceOrientation)orientation withWidth:(
int)width andHeight:(
int)height;
445 -(void) windowResized:(CGSize)size;
453 -(void) setLogLevel:(
int)level;
459 -(void) setFPS:(
unsigned int)fps;
467 -(void) setNearPlane:(
float)near andFarPlane:(
float)far;
474 -(void) setInitPose:(
float * _Nonnull)t andQ:(
float* _Nonnull)q;
480 -(void) setInitPoseFromMatrix:(
float * _Nonnull)m;
488 -(void) configureExtrinsicCameraInverted:(BOOL)invert;
512 -(BOOL) getLastExtrinsic:(
float * _Nonnull)m;
519 -(void) applyInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(
float)angle;
527 -(void) getInitPoseCorrectionWithAxis:(
float* _Nonnull)axis andAngle:(
float* _Nonnull)angle;
536 -(BOOL) enableDebugImage:(NSString * _Nullable)debugImageName;
538 #ifdef vlSDKFOR_IPHONE 542 -(void)startAlignInitPoseWithSensor;
547 -(void)stopAlignInitPoseWithSensor;
550 #ifdef vlSDKFOR_IPHONE 555 -(UIImage * _Nullable)getLastImage;
561 -(NSImage * _Nullable) getLastImage;
571 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withFloatValue:(
float)value;
579 -(void)setAttributeCommand:(NSString * _Nonnull)attribute withStringValue:(NSString * _Nonnull)value;
586 -(void)getAttributeRequest:(NSString * _Nonnull)attribute;
594 -(void)setCalibrationCommand:(NSString * _Nonnull)command;
601 -(void)writeCalibrationDB:(NSString * _Nonnull)uri;
609 -(NSString * _Nullable)getTrackerType;
624 -(void)writeInitData:(NSString *_Nonnull)uri;
639 -(void)readInitData:(NSString *_Nonnull)uri;
646 -(void)resetInitData;
654 -(void)setModel:(NSString *_Nonnull)name property:(NSString *_Nonnull)property state:(
bool)enable;
663 -(void)requestModelProperties;
670 -(void)requestModelData:(NSString*_Nonnull)name withOptions:(NSString *_Nonnull)options;
678 -(void)removeModel:(NSString*_Nonnull)nameURI;
717 -(BOOL)addRawModelWithStruct:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
720 -(void)pushJsonAndBinaryCommand:(NSString *_Nonnull)struc andData:(NSData*_Nonnull)data;
721 -(void)pushJsonCommand:(NSString *_Nonnull)json;
722 -(void)writeLineModelData:(NSString *_Nonnull)uri;
723 -(void)readLineModelData:(NSString *_Nonnull)uri;
int subMeshCount
Stats of the model regarding the number of mehes.
Definition: vlSDK_Apple.h:106
NSString * info
Definition: vlSDK_Apple.h:124
NSString * modelHash
The model hash code for licensing of the model.
Definition: vlSDK_Apple.h:94
Definition: vlSDK_Apple.h:130
NSString * message
Definition: vlSDK_Apple.h:133
int code
Definition: vlSDK_Apple.h:125
bool enabled
If the model is expected to be shown.
Definition: vlSDK_Apple.h:91
bool occluder
If the model will occlude other parts as an invisible part.
Definition: vlSDK_Apple.h:103
NSArray< vlTrackingIssue * > * issues
Definition: vlSDK_Apple.h:132
Definition: vlSDK_Apple.h:122
Convenient function for using the vlSDK in a simple manner. The vlSDK wrapper uses the C-Interface a...
Definition: vlSDK_Apple.h:357
int level
Definition: vlSDK_Apple.h:126
NSString * name
The name which has either been automatically assigned, or is coming from the model definitions...
Definition: vlSDK_Apple.h:97
int triangleCount
Stats of the model regarding the number of triangles used.
Definition: vlSDK_Apple.h:109
NSString * uri
The URI of the object that has been referenced.
Definition: vlSDK_Apple.h:100
Properties of models managed by the visionlib. The model properties can be queried by calling request...
Definition: vlSDK_Apple.h:87