Classes
The following classes are available globally.
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBAcneRegions : NSObject - (nonnull instancetype)initWithRegions:(nonnull NSArray<BNBPixelRect *> *)regions basisTransform:(nonnull NSArray<NSNumber *> *)basisTransform; + (nonnull instancetype)acneRegionsWithRegions:(nonnull NSArray<BNBPixelRect *> *)regions basisTransform:(nonnull NSArray<NSNumber *> *)basisTransform; @property (nonatomic, readonly, nonnull) NSArray<BNBPixelRect *> * regions; /** (common -> rect) transformation */ @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * basisTransform; @end
Swift
class BNBAcneRegions : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBActionUnits : NSObject - (nonnull instancetype)initWithRotX:(float)rotX rotY:(float)rotY rotZ:(float)rotZ units:(nonnull NSArray<NSNumber *> *)units; + (nonnull instancetype)actionUnitsWithRotX:(float)rotX rotY:(float)rotY rotZ:(float)rotZ units:(nonnull NSArray<NSNumber *> *)units; @property (nonatomic, readonly) float rotX; @property (nonatomic, readonly) float rotY; @property (nonatomic, readonly) float rotZ; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * units; @end
Swift
class BNBActionUnits : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBActionUnitsData : NSObject - (nonnull instancetype)initWithFaces:(nonnull NSArray<BNBActionUnits *> *)faces; + (nonnull instancetype)actionUnitsDataWithFaces:(nonnull NSArray<BNBActionUnits *> *)faces; @property (nonatomic, readonly, nonnull) NSArray<BNBActionUnits *> * faces; @end
Swift
class BNBActionUnitsData : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBAssetManager : NSObject /** *create image of given type *@param name (string): image name *@param type (image_type): image type *@return created image (image). */ - (nullable BNBImage *)createImage:(nonnull NSString *)name type:(BNBImageType)type; /** *create resource and start async loading in the asset_manager threadpool *@param name (resource): resource filename *@return created resource (resource). */ - (nullable BNBResource *)createResource:(nonnull NSString *)filename; - (nullable BNBImage *)createSegmentationMask:(nonnull NSString *)name type:(BNBSegmentationMaskType)type; - (nullable BNBImage *)createProceduralTexture:(nonnull NSString *)name type:(BNBProceduralAlgorithmType)type; /** *creates render target *@param name (string): render target name *@return created render target (render_target). */ - (nullable BNBRenderTarget *)createRenderTarget:(nonnull NSString *)name; /** *creates audio_track *@param name (string): audio track name *@return created audio track (audio_track). */ - (nullable BNBAudioTrack *)createAudioTrack:(nonnull NSString *)name; /** *creates face *@param name (string): face name *@return created face (face). */ - (nullable BNBFace *)createFace:(nonnull NSString *)name; /** *creates morphing *@param name (string): morphing name *@return created morphing (morphing). */ - (nullable BNBMorphing *)createMorph:(nonnull NSString *)name type:(BNBMorphingType)type; /** *creates static mesh *@param name (string): mesh name *@return created mesh (mesh). */ - (nullable BNBMesh *)createStaticMesh:(nonnull NSString *)name; /** *creates dynamicaly updated mesh *@param name (string): mesh name *@param path (string): path to mesh *@return created mesh (mesh). */ - (nullable BNBMesh *)createDynamicMesh:(nonnull NSString *)name path:(nonnull NSString *)path; /** *creates hand *@param name (string): hand name *@return created hand (hand). */ - (nullable BNBHand *)createHand:(nonnull NSString *)name; /** *upload mesh file *@param mesh (mesh): mesh *@param fileName (string): file to upload */ - (void)uploadMeshData:(nullable BNBMesh *)mesh fileName:(nonnull NSString *)fileName; /** *creates material *@param name (string): material name *@param path (string): path to shaders *@return created material (material). */ - (nullable BNBMaterial *)createMaterial:(nonnull NSString *)name path:(nonnull NSString *)path; /** *creates material *@param name (string): material name *@param vsPath (string): path to vertex shader *@param fsPath (string): path to fragment shader *@param instanceCount (i32): instances count *@param extraDefs (list<string>): defines list for shader *@return created material (material). */ - (nullable BNBMaterial *)createMaterialExt:(nonnull NSString *)name vsPath:(nonnull NSString *)vsPath fsPath:(nonnull NSString *)fsPath instanceCount:(int32_t)instanceCount extraDefs:(nonnull NSArray<NSString *> *)extraDefs; /** *Find image by specified name. Returns null if image not found. *@param name (string) image name. */ - (nullable BNBImage *)findImage:(nonnull NSString *)name; /** *Find render target by specified name. Returns null if render target not found. *@param name (string) render target name. */ - (nullable BNBRenderTarget *)findRenderTarget:(nonnull NSString *)name; /** *Find audio track by specified name. Returns null if audio track not found. *@param name (string) audio track name. */ - (nullable BNBAudioTrack *)findAudioTrack:(nonnull NSString *)name; /** *Find face by specified name. Returns null if face not found. *@param name (string) face name. */ - (nullable BNBFace *)findFace:(nonnull NSString *)name; /** *Find hand by specified name. Returns null if hand not found. *@param name (string) hand name. */ - (nullable BNBHand *)findHand:(nonnull NSString *)name; /** *Find morph by specified name. Returns null if morph not found. *@param name (string) morph name. */ - (nullable BNBMorphing *)findMorph:(nonnull NSString *)name; /** *Find mesh by specified name. Returns null if mesh not found. *@param name (string) mesh name. */ - (nullable BNBMesh *)findMesh:(nonnull NSString *)name; /** *Find material by specified name. Returns null if material not found. *@param name (string) material name. */ - (nullable BNBMaterial *)findMaterial:(nonnull NSString *)name; @end
Swift
class BNBAssetManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBAttachment : NSObject /**@return attachment type (attachment_type). Can be color, or depth */ - (BNBAttachmentType)getAttachmentType; /**@param type (attachment_type). Can be color, or depth */ - (void)setType:(BNBAttachmentType)type; /**@param color (vec4). Also implisity set attachment load behaviour to clear. */ - (void)setClearColor:(nonnull BNBVec4 *)color; /**@return attachment clear color (vec4) */ - (nonnull BNBVec4 *)getClearColor; /** *set attachment width *@param width (int) */ - (void)setWidth:(int32_t)value; /** *set attachment height *@param height (int) */ - (void)setHeight:(int32_t)value; /**@return attachment width (int) */ - (int32_t)getWidth; /**@return attachment height (int) */ - (int32_t)getHeight; - (void)setInfo:(nonnull BNBAttachmentInfo *)info; - (nonnull BNBAttachmentInfo *)getInfo; /**set attachment pixel format */ - (void)setFormat:(BNBPixelFormatType)format; /**@return attachment pixel format */ - (BNBPixelFormatType)getFormat; /** *set attachment texture filtering mode *param mode (texture_filtering_mode) */ - (void)setFilteringMode:(BNBTextureFilteringMode)value; /**@return filtering mode (texture_filtering_mode) */ - (BNBTextureFilteringMode)getFilteringMode; /**@return upcast to base type */ - (nullable BNBImage *)asImage; @end
Swift
class BNBAttachment : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBAttachmentInfo : NSObject - (nonnull instancetype)initWithLoadBehaviour:(BNBAttachmentLoadOp)loadBehaviour storeBehaviour:(BNBAttachmentStoreOp)storeBehaviour format:(BNBPixelFormatType)format clearColor:(nonnull BNBVec4 *)clearColor generateMipmaps:(BOOL)generateMipmaps; + (nonnull instancetype)attachmentInfoWithLoadBehaviour:(BNBAttachmentLoadOp)loadBehaviour storeBehaviour:(BNBAttachmentStoreOp)storeBehaviour format:(BNBPixelFormatType)format clearColor:(nonnull BNBVec4 *)clearColor generateMipmaps:(BOOL)generateMipmaps; @property (nonatomic, readonly) BNBAttachmentLoadOp loadBehaviour; @property (nonatomic, readonly) BNBAttachmentStoreOp storeBehaviour; @property (nonatomic, readonly) BNBPixelFormatType format; @property (nonatomic, readonly, nonnull) BNBVec4 * clearColor; @property (nonatomic, readonly) BOOL generateMipmaps; @end
Swift
class BNBAttachmentInfo : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBAudioTrack : NSObject /** *set current audio track playback volume. *@param volume (float): new audio volume. must be in range [0, 1] */ - (void)setVolume:(float)volume; /**@return current audio track playback volume (float) */ - (float)getVolume; /** *Load audio track file. For now only supports .m4a, .ogg, .mp3 files. *@param file (string): absolute path for audio track file. */ - (void)load:(nonnull NSString *)file; /**@return current loaded audio track (string). */ - (nonnull NSString *)getCurrentTrack; /**cast audio_track to media parent class (media). */ - (nullable BNBMedia *)asMedia; @end
Swift
class BNBAudioTrack : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBBeautyMorphing : NSObject /** *Sets face morphing weight. *@param value (float) morphing weight. */ - (void)setFaceWeight:(float)value; /**@return morphing weight (float). */ - (float)getFaceWeight; /** *Sets nose morphing weight. *@param value (float) morphing weight. */ - (void)setNoseWeight:(float)value; /**@return morphing weight (float). */ - (float)getNoseWeight; /** *Sets nose morphing weight. *@param value (float) morphing weight. */ - (void)setEyesWeight:(float)value; /**@return morphing weight (float). */ - (float)getEyesWeight; @end
Swift
class BNBBeautyMorphing : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBBnbMorphResult : NSObject - (nonnull instancetype)initWithImg:(nonnull BNBFullImageData *)img landmarks:(nonnull NSArray<NSNumber *> *)landmarks; + (nonnull instancetype)bnbMorphResultWithImg:(nonnull BNBFullImageData *)img landmarks:(nonnull NSArray<NSNumber *> *)landmarks; @property (nonatomic, readonly, nonnull) BNBFullImageData * img; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * landmarks; @end
Swift
class BNBBnbMorphResult : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBBodyTracker : NSObject /** *Fabric method for body_tracker creating. *@return created (body_tracker). */ + (nullable BNBBodyTracker *)create; /**@return tracker type. */ - (BNBBodyTrackerType)getType; /**@return tracker type. */ - (void)setType:(BNBBodyTrackerType)type; - (void)setBodyIndex:(int32_t)index; - (int32_t)getBodyIndex; /**@return upcast to base type */ - (nullable BNBComponent *)asComponent; @end
Swift
class BNBBodyTracker : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBBrowsMask : NSObject - (nonnull instancetype)initWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; + (nonnull instancetype)browsMaskWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * left; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * right; @end
Swift
class BNBBrowsMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBCamera : NSObject - (void)setParameters:(nonnull BNBCameraParameters *)parameters; - (nonnull BNBCameraParameters *)getParameters; @end
Swift
class BNBCamera : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBCameraComposer : NSObject /** * Pass empty path to reset background image. * Supported extensions: jpg, jpeg, png, mp4, gif * play and loop args only for video */ - (void)setBackgroundImage:(nonnull NSString *)path play:(BOOL)play loop:(BOOL)loop; - (void)setBackgroundImageByFd:(int32_t)fd; - (void)setBackgroundVideoByFd:(int32_t)fd play:(BOOL)play loop:(BOOL)loop; - (nullable BNBImage *)getBackgroundImage; - (nullable BNBVideo *)getBackgroundVideo; - (void)enableBlur:(BOOL)enable; - (void)setBlurRadius:(int32_t)radius; - (void)setBgTransparencyFactor:(float)factor; - (void)setRotation:(float)degrees; - (void)setScale:(float)x y:(float)y; - (void)setContentMode:(int32_t)mode; - (void)setBackgroundColor:(float)r g:(float)g b:(float)b a:(float)a; /** * Specifies the color of the area not covered by background texture (e.g. `contentMode` `FIT`). * Black by default. Transparency (`a`) is a conventional argument only and currently ignored * (use `1` for it). */ - (void)setClearColor:(float)r g:(float)g b:(float)b a:(float)a; @end
Swift
class BNBCameraComposer : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBCameraParameters : NSObject - (nonnull instancetype)initWithProjection:(BNBProjectionType)projection zNear:(float)zNear zFar:(float)zFar fov:(float)fov frameWidth:(int32_t)frameWidth frameHeight:(int32_t)frameHeight; + (nonnull instancetype)cameraParametersWithProjection:(BNBProjectionType)projection zNear:(float)zNear zFar:(float)zFar fov:(float)fov frameWidth:(int32_t)frameWidth frameHeight:(int32_t)frameHeight; @property (nonatomic, readonly) BNBProjectionType projection; @property (nonatomic, readonly) float zNear; @property (nonatomic, readonly) float zFar; @property (nonatomic, readonly) float fov; @property (nonatomic, readonly) int32_t frameWidth; @property (nonatomic, readonly) int32_t frameHeight; @end
Swift
class BNBCameraParameters : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBCameraPosition : NSObject - (nonnull instancetype)initWithModelViewM:(nonnull NSArray<NSNumber *> *)modelViewM projectionM:(nonnull NSArray<NSNumber *> *)projectionM; + (nonnull instancetype)cameraPositionWithModelViewM:(nonnull NSArray<NSNumber *> *)modelViewM projectionM:(nonnull NSArray<NSNumber *> *)projectionM; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * modelViewM; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * projectionM; @end
Swift
class BNBCameraPosition : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBCameraTexture : NSObject /**@return camera texture format (camera_texture_format). Can be Y, UV, or RGBA. */ - (BNBCameraTextureFormat)getFormat; /** *set camera texture format for current texture. *@param format (camera_texture_format). Can be Y, UV, or RGBA. */ - (void)setFormat:(BNBCameraTextureFormat)format; /**@return upcast to base type */ - (nullable BNBImage *)asImage; @end
Swift
class BNBCameraTexture : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBComponent : NSObject /**@return component type. Can be face_tracker, transformation, mesh_instance or face_morphing. */ - (BNBComponentType)getComponentType; /**cast component to face tracker subclass instance. Will throw if derived class is not instance of face_tracker. */ - (nullable BNBFaceTracker *)asFaceTracker; /**cast component to mesh_instance subclass instance. Will throw if derived class is not instance of mesh_instance. */ - (nullable BNBMeshInstance *)asMeshInstance; /**cast component to face_morphing subclass instance. Will throw if derived class is not instance of face_morphing. */ - (nullable BNBFaceMorphing *)asFaceMorphing; /**cast component to transformation_3d subclass instance. Will throw if derived class is not instance of transformation_3d. */ - (nullable BNBTransformation3d *)asTransformation; /**cast component to hand_tracker subclass instance. Will throw if derived class is not instance of hand_tracker. */ - (nullable BNBHandTracker *)asHandTracker; /**cast component to body_tracker subclass instance. Will throw if derived class is not instance of body_tracker. */ - (nullable BNBBodyTracker *)asBodyTracker; @end
Swift
class BNBComponent : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBCubemap : NSObject - (void)loadResource:(nullable BNBResource *)res; /** *Load cubemap texture data from specified file name. For now only supported .ktx (cuemap) images. *@param file_name (string): absolute path for image file. */ - (void)load:(nonnull NSString *)filename; /**@return upcast to base type */ - (nullable BNBImage *)asImage; @end
Swift
class BNBCubemap : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBDepthMap : NSObject - (nonnull instancetype)initWithDepthData:(nonnull NSData *)depthData depthMapWidth:(int32_t)depthMapWidth depthMapHeight:(int32_t)depthMapHeight; + (nonnull instancetype)depthMapWithDepthData:(nonnull NSData *)depthData depthMapWidth:(int32_t)depthMapWidth depthMapHeight:(int32_t)depthMapHeight; @property (nonatomic, readonly, nonnull) NSData * depthData; @property (nonatomic, readonly) int32_t depthMapWidth; @property (nonatomic, readonly) int32_t depthMapHeight; @end
Swift
class BNBDepthMap : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEar : NSObject - (nonnull instancetype)initWithTranslate:(nonnull BNBVec3 *)translate visible:(BOOL)visible; + (nonnull instancetype)earWithTranslate:(nonnull BNBVec3 *)translate visible:(BOOL)visible; @property (nonatomic, readonly, nonnull) BNBVec3 * translate; @property (nonatomic, readonly) BOOL visible; @end
Swift
class BNBEar : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEffect : NSObject /** Thread-safe. May be called from any thread */ - (nonnull NSString *)url; /** * Call js method in effect. * @param methodName JS global function name. Member functions are not supported. * @param params Function arguments. * @depreacted Use `evalJs` instead. */ - (void)callJsMethod:(nonnull NSString *)methodName params:(nonnull NSString *)params; /** * Evaluate the `script` in effect. This method is thread safe. * @param sctipt JS string to execute * @param js_callback Callback for result, will be called in render thread. */ - (void)evalJs:(nonnull NSString *)script resultCallback:(nullable id<BNBJsCallback>)resultCallback; /** * Evaluate the `script` in effect. * MUST be called from the render thread * @param sctipt JS string to execute * @return JS evaluation result */ - (nonnull NSString *)evalJsSync:(nonnull NSString *)script; /** * Reset effect state * MUST be called from the render thread */ - (void)reset; /** * Update effect state (evaluate scheduled JS calls) * MUST be called from the render thread */ - (void)update; /** * If effect is based on Scene engine and it is activated completly - returns Scene object from the effect. * Otherwise returns null. * MUST be called from the render thread * Returned Scene object MUST be used only from the render thread and only while the effect is in the activated state. */ - (nullable BNBScene *)scene; /** * Deserialize effect from the provided `resoved_url`. If `configOverride` is an * empty string, will use `config.json` under provided `resolvedUrl`, otherwise * content of `configOverride` will be used. * * Can be called from any thread. */ - (void)deserialize:(nonnull NSString *)resolvedUrl configOverride:(nonnull NSString *)configOverride; /** * activate current effect * MUST be called from the render thread for OpenGL backends. */ - (void)activate:(int32_t)fxWidth fxHeight:(int32_t)fxHeight surfaceWidth:(int32_t)surfaceWidth surfaceHeight:(int32_t)surfaceHeight; - (void)dumpFs:(nonnull NSString *)outDir; - (void)dump; - (nonnull NSString *)dumpJson; - (BNBEffectStatus)status; @end
Swift
class BNBEffect : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEffectInfo : NSObject - (nonnull instancetype)initWithUrl:(nonnull NSString *)url recognizerFeatures:(nonnull NSSet<NSNumber *> *)recognizerFeatures usesAudio:(BOOL)usesAudio usesVideo:(BOOL)usesVideo usesTouches:(BOOL)usesTouches usesBgSeparation:(BOOL)usesBgSeparation; + (nonnull instancetype)effectInfoWithUrl:(nonnull NSString *)url recognizerFeatures:(nonnull NSSet<NSNumber *> *)recognizerFeatures usesAudio:(BOOL)usesAudio usesVideo:(BOOL)usesVideo usesTouches:(BOOL)usesTouches usesBgSeparation:(BOOL)usesBgSeparation; @property (nonatomic, readonly, nonnull) NSString * url; @property (nonatomic, readonly, nonnull) NSSet<NSNumber *> * recognizerFeatures; @property (nonatomic, readonly) BOOL usesAudio; @property (nonatomic, readonly) BOOL usesVideo; @property (nonatomic, readonly) BOOL usesTouches; @property (nonatomic, readonly) BOOL usesBgSeparation; @end
Swift
class BNBEffectInfo : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEffectManager : NSObject /** * Add callback to receive errors messages from Effect Player. * Thread-safe. May be called from any thread */ - (void)addErrorListener:(nullable id<BNBErrorListener>)errorListener; /** * Remove callback to receive errors messages from Effect Player. * Thread-safe. May be called from any thread */ - (void)removeErrorListener:(nullable id<BNBErrorListener>)errorListener; /** * Add callback to receive user-visible messages from effects. * You should display them on UI. * Thread-safe. May be called from any thread */ - (void)addHintListener:(nullable id<BNBHintListener>)hintListener; /** * Remove callback to receive user-visible messages from effects. * Thread-safe. May be called from any thread */ - (void)removeHintListener:(nullable id<BNBHintListener>)hintListener; /** * Add callback to receive events from effect. * Thread-safe. May be called from any thread */ - (void)addEffectEventListener:(nullable id<BNBEffectEventListener>)effectEventListener; /** * Remove callback to receive events from effect. * Thread-safe. May be called from any thread */ - (void)removeEffectEventListener:(nullable id<BNBEffectEventListener>)effectEventListener; /** * Add callback to receive notifications on effect change. * Thread-safe. May be called from any thread */ - (void)addEffectActivatedListener:(nullable id<BNBEffectActivatedListener>)effectActivatedListener; /** * Remove callback to receive notifications on effect change. * Thread-safe. May be called from any thread */ - (void)removeEffectActivatedListener:(nullable id<BNBEffectActivatedListener>)effectActivatedListener; /** Create empty effect. If working directory path is empty string then effect assumed as an in-memory effect. */ - (nullable BNBEffect *)createEffect:(nonnull NSString *)workDir; /** * Set current effect. * Thread-safe. May be called from any thread */ - (void)setCurrentEffect:(nullable BNBEffect *)effect; /** * Load and activate effect sync. * MUST be called from the render thread. */ - (nullable BNBEffect *)load:(nonnull NSString *)url; /** * Load effect async, activate in the draw() call when it will be ready. * Thread-safe. May be called from any thread. */ - (nullable BNBEffect *)loadAsync:(nonnull NSString *)url; /** * Reload current effect config from the string provided. If this reload * is possible without effect recreation, this method will return `hot_reload == true`, * otherwise `current` effect will be replaced and the method will return * `hot_reload == false`. * * Thread-safe. May be called from any thread. */ - (nullable BNBReloadResult *)reloadConfig:(nonnull NSString *)config; /** * Get effect info. May be called before loading effect * "render type" and "recognizer features" fields won't be filled * Thread-safe. May be called from any thread */ + (nonnull BNBEffectInfo *)getEffectInfo:(nonnull NSString *)url; /** * Unload effect from cache. if no currently loading effect - * works the same way as load(""); launches empty effect loading. * MUST be called from the render thread */ - (void)unload:(nullable BNBEffect *)effect; /** * Get active effect * Thread-safe. May be called from any thread */ - (nullable BNBEffect *)current; /** * Update effect loading state * @param sync syncronize effect manager, block until effect loaded * MUST be called from the render thread */ - (void)update:(BOOL)sync; /** * Get current effect size * Thread-safe. May be called from any thread */ - (nonnull BNBSize *)effectSize; /** * Get current surface size * Thread-safe. May be called from any thread */ - (nonnull BNBSize *)surfaceSize; /** * Get effect audio volume. * Thread-safe. May be called from any thread * @return A volume in range `[0, 1]`, where `1` means maximum volume. */ - (float)effectVolume; /** * Set effect audio volume. * Thread-safe. May be called from any thread * @param volume A value in range `[0, 1]`, where `1` means maximum volume. */ - (void)setEffectVolume:(float)volume; /** * Changes effect player render size, should be called on render thread. * MUST be called from the render thread */ - (void)setEffectSize:(int32_t)fxWidth fxHeight:(int32_t)fxHeight; /** set different render surfaces. Can be treated as void* */ - (void)setRenderSurface:(nonnull BNBSurfaceData *)data; /** disable surface presentation. Needed for offscreen rendering */ - (void)disableSurfacePresentation; @end
Swift
class BNBEffectManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEffectPlayer : NSObject + (nullable BNBEffectPlayer *)create:(nullable BNBEffectPlayerConfiguration *)configuration; /** * Add callback to receive FPS information. * Thread-safe. May be called from any thread */ - (void)addFrameDurationListener:(nullable id<BNBFrameDurationListener>)frameDurationListener; /** * Remove callback to receive FPS information. * Thread-safe. May be called from any thread */ - (void)removeFrameDurationListener:(nullable id<BNBFrameDurationListener>)frameDurationListener; /** * Add callback to receive faces count in frame. * Thread-safe. May be called from any thread */ - (void)addFaceNumberListener:(nullable id<BNBFaceNumberListener>)faceNumberListener; /** * Remove callback to receive faces count in frame. * Thread-safe. May be called from any thread */ - (void)removeFaceNumberListener:(nullable id<BNBFaceNumberListener>)faceNumberListener; /** * Add callback to receive frame data right after processing in recognizer. * Thread-safe. May be called from any thread */ - (void)addFrameDataListener:(nullable id<BNBFrameDataListener>)frameDataListener; /** * Remove callback to receive frame data right after processing in recognizer. * Thread-safe. May be called from any thread */ - (void)removeFrameDataListener:(nullable id<BNBFrameDataListener>)frameDataListener; /** * Add callback to receive center of the face in frame relative to top-left * corner in [0, 1] space. * Thread-safe. May be called from any thread */ - (void)addCameraPoiListener:(nullable id<BNBCameraPoiListener>)cameraPoiListener; /** * Remove callback to receive center of the face in frame relative to top-left * Thread-safe. May be called from any thread */ - (void)removeCameraPoiListener:(nullable id<BNBCameraPoiListener>)cameraPoiListener; /** * Add callback to receive current effect info from Effect Player. * Thread-safe. May be called from any thread */ - (void)addEffectInfoListener:(nullable id<BNBEffectInfoListener>)effectInfoListener; /** * Remove callback to receive current effect info from Effect Player. * Thread-safe. May be called from any thread */ - (void)removeEffectInfoListener:(nullable id<BNBEffectInfoListener>)effectInfoListener; /** * Add callback to receive current effect activation notification from Effect Player. * Thread-safe. May be called from any thread */ - (void)addEffectActivationCompletionListener:(nullable id<BNBEffectActivationCompletionListener>)effectActivationCompletionListener; /** * Remove callback to receive current effect activation notification from Effect Player. * Thread-safe. May be called from any thread */ - (void)removeEffectActivationCompletionListener:(nullable id<BNBEffectActivationCompletionListener>)effectActivationCompletionListener; /** * Sets maximum allowed face results, if face tracking feature is present. * Thread-safe. May be called from any thread * This option is relevant only for GLFX effects. */ - (void)setMaxFaces:(int32_t)maxFaces; /** * Set OpenGL name of input external texture. * https://developer.android.com/reference/android/graphics/SurfaceTexture . * MUST be called from the render thread * * @param name Texture name * @param width Textute width * @param height Texture height * * @see setUseExtCamTex * * <br/> Note: This function is Android only. * <br/> Note: We use texture size to calculate aspect ratio only. */ - (void)setExternalCameraTexture:(int32_t)name width:(int32_t)width height:(int32_t)height; /** * Use external texture as input source. * MUST be called from the render thread * @see setExternalCameraTexture * @note This function is Android only */ - (void)setUseExtCamTex:(BOOL)value; /** * Use to notify the EffectPlayer that the surface exists and effect can be played. * 0, 0 for width and height are valid values. * MUST be called from the render thread */ - (void)surfaceCreated:(int32_t)width height:(int32_t)height; /** * Notify about rendering surface being resized. * MUST be called from the render thread */ - (void)surfaceChanged:(int32_t)width height:(int32_t)height; /** * This method should be called right before an active context will become invalid. * Switches playback state to inactive state. If it's not done an application will be * crashed on next draw iteration. After losing the surface effect playback can't be * resumed from last position. * MUST be called from the render thread */ - (void)surfaceDestroyed; /** * Draw the current effect into the current OpenGL framebuffer. Uses internal frame_data * object obtained from latest push_frame recognition result. * * Return current frame number if drawing was performed and caller should swap buffers * otherwise `DRAW_SKIPPED`(-1) * MUST be called from the render thread */ - (int64_t)draw; /** * Draw the current effect into the current OpenGL framebuffer. Uses externally provided frameData * object instead of internal one obtained from latest push_frame recognition result. * * Return frame number from provided frameData if drawing was performed and caller should swap buffers * otherwise `DRAW_SKIPPED`(-1) * MUST be called from the render thread */ - (int64_t)drawWithExternalFrameData:(nullable BNBFrameData *)frameData; /** * Record last rendering ("draw_()") result into current OpenGL framebuffer. * Content is cropped to maintain effect_size() aspect ratio * MUST be called from the render thread */ - (void)captureBlit:(int32_t)captureWidth captureHeight:(int32_t)captureHeight; /** * Receive the last rendered frame in binary form. * * @return 4-byte per pixel data, size is `fx_width * fx_height * 4` * MUST be called from the render thread */ - (nonnull BNBPixelBuffer *)readPixels; /** Thread-safe. May be called from any thread */ - (void)setRenderConsistencyMode:(BNBConsistencyMode)value; /** * Process an image with current effect. * * Must be called from the render thread. * * @param inputImage to avoid conversion recommended to use YUV image * @param outputPixelFormat to avoid conversion recommended to use RGBA * @param params extra image processing arguments */ - (nonnull NSData *)processImage:(nonnull BNBFullImageData *)inputImage outputPixelFormat:(BNBPixelFormat)outputPixelFormat; /** * Process an image with current effect. * Prefer this method over `processImage` when you have extra input data * besides just an input image. * * Must be called from render thread. * * @param inputFrameData `FrameData` with an image * @param outputPixelFormat to avoid conversion recommended to use RGBA * @param params extra image processing arguments */ - (nonnull NSData *)processImageFrameData:(nullable BNBFrameData *)inputFrameData outputPixelFormat:(BNBPixelFormat)outputPixelFormat; /** * Process image with current effect. * Must be called from render thread. * NOTE: inputImage have copy overhead, preferable to use process_image method * MUST be called from the render thread * @param inputImage input image with `width * height * 4` size * @param outputPixelFormat to avoid conversion recommended to use RGBA */ - (nonnull NSData *)processImageData:(nonnull NSData *)inputImage width:(int32_t)width height:(int32_t)height orientation:(BNBCameraOrientation)orientation isMirrored:(BOOL)isMirrored inputPixelFormat:(BNBPixelFormat)inputPixelFormat outputPixelFormat:(BNBPixelFormat)outputPixelFormat; /** * Provides image to process and to play effect. * Thread-safe. May be called from any thread */ - (void)pushFrame:(nonnull BNBFullImageData *)fullImage; /** * Provides image to process and to play effect. * Thread-safe. May be called from any thread */ - (void)pushFrameWithNumber:(nonnull BNBFullImageData *)fullImage frameNumber:(int64_t)frameNumber; /** * Provides FrameData to process and to play effect. * Must contain full image. * Thread-safe. May be called from any thread */ - (void)pushFrameData:(nullable BNBFrameData *)frameData; /** * Provides FrameData with frame number to process and to play effect. * Must contain full image. * Thread-safe. May be called from any thread */ - (void)pushFrameDataWithNumber:(nullable BNBFrameData *)frameData frameNumber:(int64_t)frameNumber; /** MUST be called from the main(render) thread */ - (void)playbackPlay; - (void)playbackPause; - (void)playbackStop; /** Thread-safe. May be called from any thread */ - (BNBEffectPlayerPlaybackState)getPlaybackState; /** * Get interface to control user iterations. This events will be passed to effect. * Thread-safe. May be called from any thread */ - (nullable BNBInputManager *)getInputManager; /** * Initialize video processing. To provide frames use *process_video_frame* methods. * Effect audio is recorded as well and can be accessed using *process_recorded_audio* * and *write_recorded_audio*. * *push_frame* should not be called during processing. * MUST be called from the render thread * @throw Exception Must be aborted with stop_video_processing() */ - (void)startVideoProcessing:(int64_t)screenWidth screenHeight:(int64_t)screenHeight orientation:(BNBCameraOrientation)orientation resetEffect:(BOOL)resetEffect offlineMode:(BOOL)offlineMode; /** * Finish processing and return renderer to normal state. * MUST be called from the render thread */ - (void)stopVideoProcessing:(BOOL)resetEffect; /** * Provide frame data to evaluate video processing. * MUST be called from the render thread * @param inputFrameData Frame Data to process. * @param params Processing params. * @param recognizerIterations Number of processing iterations. Higher number means higher processing quality, but lower speed. Must be greater than 1. Pass null value for default number. * @return Frame data with frame processing results. */ - (nullable BNBFrameData *)processVideoFrameData:(nullable BNBFrameData *)inputFrameData recognizerIterations:(nullable NSNumber *)recognizerIterations; /** * Provide frame to evaluate video processing. * MUST be called from the render thread * @param inputImage Image to process. * @param params Processing params. * @param recognizerIterations Number of processing iterations. Higher number means higher processing quality, but lower speed. Must be greater than 1. Pass null value for default number. * @return Frame data with frame processing results. */ - (nullable BNBFrameData *)processVideoFrame:(nonnull BNBFullImageData *)inputImage recognizerIterations:(nullable NSNumber *)recognizerIterations; /** * Draw processed frame to image buffer. * MUST be called from the render thread * @param inputFrameData FrameData to draw. * @param timeNs Frame position on timeline. * @param outputPixelFormat Output image format. * @return Buffer with processed image in selected format. */ - (nonnull NSData *)drawVideoFrame:(nullable BNBFrameData *)inputFrameData timeNs:(int64_t)timeNs outputPixelFormat:(BNBPixelFormat)outputPixelFormat; /** * The same as *draw_video_frame* but accepts preallocated buffer to avoid recreation for every frame. * MUST be called from the render thread */ - (nonnull NSData *)drawVideoFrameAllocated:(nullable BNBFrameData *)inputFrameData timeNs:(int64_t)timeNs outputPixelFormat:(BNBPixelFormat)outputPixelFormat allocatedBuffer:(nonnull NSData *)allocatedBuffer; /** * Save recorded audio. * Not thread-safe but can be called from any thread. * @param filename ".wav" extension must be used. * @param lengthMs Track length. Set to '0' to use full duration. */ - (void)writeRecordedAudio:(nonnull NSString *)filename lengthMs:(int64_t)lengthMs; /** * Trigger record start events in EP and Effect. * Records all sounds during recording * to be replayed by `processRecordedAudio`. * If @param playAudioWhileRecording is true, the audio will continue to play. Otherwise, the audio will be muted. * Thread-safe. May be called from any thread */ - (void)onVideoRecordStart:(BOOL)playAudioWhileRecording; /** * Triggers record stop events in EP and Effect. * Thread-safe. May be called from any thread */ - (void)onVideoRecordEnd; /** * Get effect manager object * Thread-safe. May be called from any thread */ - (nullable BNBEffectManager *)effectManager; /** * Force recognizer offline mode * Thread-safe. May be called from any thread */ - (void)setRecognizerOfflineMode:(BOOL)on; /** * Set future frame filtrarion mode. * Produce smoother recognition result (anti jitter), however adds inconsistency in push'ed/draw'ed frames (one frame lag) * Example: push frame 1 - draw frame 1, push frame 2 - draw frame 1, push frame 3 - draw frame 2, ... */ - (void)setRecognizerUseFutureFilter:(BOOL)on; /** * Set future frame interpolation mode. * Produce faster recognition result (skip even frames), however adds inconsistency in push'ed/pop'ed frames (one frame lag) * Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ... */ - (void)setRecognizerUseFutureInterpolate:(BOOL)on; /** * Set frame processor as current * Thread-safe. May be called from any thread */ - (void)setFrameProcessor:(nullable BNBFrameProcessor *)processor; /** * Get current frame processor * Thread-safe. May be called from any thread */ - (nullable BNBFrameProcessor *)frameProcessor; + (void)setRenderBackend:(BNBRenderBackendType)backendType; + (BNBRenderBackendType)getCurrentRenderBackendType; @end
Swift
class BNBEffectPlayer : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEffectPlayerConfiguration : NSObject /** * @param fxWidth Width of effect rendering area * @param fxHeight Height of effect rendering area */ + (nullable BNBEffectPlayerConfiguration *)create:(int32_t)fxWidth fxHeight:(int32_t)fxHeight; /** Init audio device. */ - (void)setAudioEnabled:(BOOL)enabled; @end
Swift
class BNBEffectPlayerConfiguration : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEglContext : NSObject + (nullable BNBEglContext *)create:(int32_t)width height:(int32_t)height; - (BOOL)check; - (void)activate; - (void)deactivate; @end
Swift
class BNBEglContext : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEntity : NSObject /** * Set a new name to the entity. Name could be empty. *@param name (string): new entity name. */ - (void)setName:(nonnull NSString *)name; /**@return entity name (string) */ - (nonnull NSString *)getName; /** *add entiy as child to hierarchy *@param child (entity): child entity. */ - (void)addChild:(nullable BNBEntity *)child; /** *remove entiy as child to hierarchy *@param child (entity): child entity. */ - (void)removeChild:(nullable BNBEntity *)child; /**get all child entites list. */ - (nonnull NSArray<BNBEntity *> *)getChildren; /**remove all child entites list. */ - (void)clearChildren; /** * Perform depth-first traverse of entity tree. * Return first found child with name `entityName` or NULL if such an entity doesn't exist. *@param entityName (string): name of desired entity *@return found entity (entity) or null */ - (nullable BNBEntity *)findChildByName:(nonnull NSString *)entityName; /**@return parent entity and null if given entity is root. */ - (nullable BNBEntity *)getParent; /** *Set enable/disable entity flag. The disabling of the entity is equivalent to removing the entity and all its children from the hierarchy. *@param active (bool) activity flag. */ - (void)setActive:(BOOL)active; /**@return activity flag (bool) */ - (BOOL)isActive; /** *Add entity for given layer if it is wasn't added before. *@param layer (layer): layer to add. */ - (void)addIntoLayer:(nullable BNBLayer *)layer; /** *Removes entity from given layer if it is was added before. *@params layer (layer): layer from remove. */ - (void)removeFromLayer:(nullable BNBLayer *)layer; /**returns list of layers in which entity was added. */ - (nonnull NSArray<BNBLayer *> *)getLayers; /** *add given component to entity if component of given type wasn't added before. *@param component (component): component to add. */ - (void)addComponent:(nullable BNBComponent *)component; /** *check if component of given type was added. *@param component_type (component_type): component type to check. *@return flag (bool) */ - (BOOL)hasComponent:(BNBComponentType)type; /** *get component of given type. *@param component_type (component_type): component type to get. *@return component of given type (component) */ - (nullable BNBComponent *)getComponent:(BNBComponentType)type; /** *remove given component to entity if component of given component was added before. *@param component (component): component to remove. */ - (void)removeComponent:(nullable BNBComponent *)component; @end
Swift
class BNBEntity : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBExternalFaceData : NSObject - (nonnull instancetype)initWithVertices:(nonnull NSArray<NSNumber *> *)vertices modelMat:(nonnull NSArray<NSNumber *> *)modelMat viewMat:(nonnull NSArray<NSNumber *> *)viewMat projMat:(nonnull NSArray<NSNumber *> *)projMat landmarks:(nonnull NSArray<NSNumber *> *)landmarks landmarksMask:(nonnull NSArray<NSNumber *> *)landmarksMask landmarksBrows:(nonnull NSArray<NSNumber *> *)landmarksBrows latents:(nonnull NSArray<NSNumber *> *)latents; + (nonnull instancetype)externalFaceDataWithVertices:(nonnull NSArray<NSNumber *> *)vertices modelMat:(nonnull NSArray<NSNumber *> *)modelMat viewMat:(nonnull NSArray<NSNumber *> *)viewMat projMat:(nonnull NSArray<NSNumber *> *)projMat landmarks:(nonnull NSArray<NSNumber *> *)landmarks landmarksMask:(nonnull NSArray<NSNumber *> *)landmarksMask landmarksBrows:(nonnull NSArray<NSNumber *> *)landmarksBrows latents:(nonnull NSArray<NSNumber *> *)latents; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * vertices; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * modelMat; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * viewMat; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * projMat; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * landmarks; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * landmarksMask; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * landmarksBrows; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * latents; @end
Swift
class BNBExternalFaceData : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEyesCorneoscleraMask : NSObject - (nonnull instancetype)initWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; + (nonnull instancetype)eyesCorneoscleraMaskWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * left; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * right; @end
Swift
class BNBEyesCorneoscleraMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEyesIrisMask : NSObject - (nonnull instancetype)initWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; + (nonnull instancetype)eyesIrisMaskWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * left; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * right; @end
Swift
class BNBEyesIrisMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEyesMask : NSObject - (nonnull instancetype)initWithIris:(nonnull BNBEyesIrisMask *)iris corneosclera:(nonnull BNBEyesCorneoscleraMask *)corneosclera pupil:(nonnull BNBEyesPupilMask *)pupil; + (nonnull instancetype)eyesMaskWithIris:(nonnull BNBEyesIrisMask *)iris corneosclera:(nonnull BNBEyesCorneoscleraMask *)corneosclera pupil:(nonnull BNBEyesPupilMask *)pupil; @property (nonatomic, readonly, nonnull) BNBEyesIrisMask * iris; @property (nonatomic, readonly, nonnull) BNBEyesCorneoscleraMask * corneosclera; @property (nonatomic, readonly, nonnull) BNBEyesPupilMask * pupil; @end
Swift
class BNBEyesMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEyesPupilMask : NSObject - (nonnull instancetype)initWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; + (nonnull instancetype)eyesPupilMaskWithLeft:(nonnull BNBTransformedMaskByte *)left right:(nonnull BNBTransformedMaskByte *)right; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * left; @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * right; @end
Swift
class BNBEyesPupilMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEyesState : NSObject - (nonnull instancetype)initWithIsOpenLeft:(BOOL)isOpenLeft isOpenRight:(BOOL)isOpenRight; + (nonnull instancetype)eyesStateWithIsOpenLeft:(BOOL)isOpenLeft isOpenRight:(BOOL)isOpenRight; @property (nonatomic, readonly) BOOL isOpenLeft; @property (nonatomic, readonly) BOOL isOpenRight; @end
Swift
class BNBEyesState : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBEyesStatus : NSObject - (nonnull instancetype)initWithIsLeftOpen:(BOOL)isLeftOpen isRightOpen:(BOOL)isRightOpen; + (nonnull instancetype)eyesStatusWithIsLeftOpen:(BOOL)isLeftOpen isRightOpen:(BOOL)isRightOpen; @property (nonatomic, readonly) BOOL isLeftOpen; @property (nonatomic, readonly) BOOL isRightOpen; @end
Swift
class BNBEyesStatus : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFace : NSObject /**@return face name (string) */ - (nonnull NSString *)getName; /**@return face index (int) */ - (int32_t)getIndex; /** *sets face index for face. Face mesh and textures will be updated according their faces index. *If index will be greater than max faces can be found face resources update will be ignored. *@param index (int): face index */ - (void)setIndex:(int32_t)index; /** *sets face mesh. Must be only "$builtin$meshes/face.stream" mesh. *@param mesh (mesh): face mesh */ - (void)setFaceMesh:(nullable BNBMesh *)mesh; /**@return face mesh (mesh) */ - (nullable BNBMesh *)getFaceMesh; @end
Swift
class BNBFace : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFaceData : NSObject + (nullable BNBFaceData *)create; - (nonnull NSArray<NSNumber *> *)getLandmarks; - (void)setLandmarks:(nonnull NSArray<NSNumber *> *)lms; - (nonnull NSArray<NSNumber *> *)getLatents; - (void)setLatents:(nonnull NSArray<NSNumber *> *)lats; - (nonnull NSArray<NSNumber *> *)getVertices; - (void)setVertices:(nonnull NSArray<NSNumber *> *)verts; - (nonnull NSArray<NSNumber *> *)getEarsLandmarks; - (void)setEarsLandmarks:(nonnull NSArray<NSNumber *> *)lms; - (nonnull NSArray<NSNumber *> *)getEarsLatents; - (void)setEarsLatents:(nonnull NSArray<NSNumber *> *)lats; - (nonnull NSArray<NSNumber *> *)getBrowsLms; - (void)setBrowsLms:(nonnull NSArray<NSNumber *> *)lms; - (nonnull BNBCameraPosition *)getCameraPosition; - (void)setCameraPosition:(nonnull BNBCameraPosition *)cam; /** filled when face_match feature is enabled */ - (nonnull NSArray<NSNumber *> *)getEmbeddings; - (BOOL)hasFace; - (nonnull BNBPixelRect *)getFaceRect; - (void)setFaceRect:(nonnull BNBPixelRect *)rect; - (BNBGender)getGender; - (void)setGender:(BNBGender)g; @end
Swift
class BNBFaceData : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFaceMorphing : NSObject /** *Fabric method for face_morphing creating. *@return created (face_morphing). */ + (nullable BNBFaceMorphing *)create:(BNBMorphingType)type; /** *Sets morphing asset. *@param morph (morphing) morphing instance. */ - (void)setMorphing:(nullable BNBMorphing *)morph; /**@return setted morphing (morphing). */ - (nullable BNBMorphing *)getMorphing; /**Cast to beauty_morphing subclass. */ - (nullable BNBBeautyMorphing *)asBeautyMorphing; /**@return visible(bool) visibility flag. */ - (BOOL)isVisible; /** *Set face_morphing visibility flag. *Will be overridden if entity with mesh_instance component is child of entity with face_tracker component. Subclass of component. *@param visible(bool) visibility flag. */ - (void)setVisible:(BOOL)visible; /** *set morphing weight. Must be in range [0, 1] *@param weight (float) */ - (void)setWeight:(float)weight; /**@return current morph weight (float) */ - (float)getWeight; /**@return upcast to base type */ - (nullable BNBComponent *)asComponent; @end
Swift
class BNBFaceMorphing : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFaceTracker : NSObject /** *Fabric method for face tracker creating. *@return face tracker component (face_tracker) */ + (nullable BNBFaceTracker *)create; /** *Sets face to face tracker. *@param face (face): face asset */ - (void)setFace:(nullable BNBFace *)face; /**@return face (face): face asset */ - (nullable BNBFace *)getFace; /** *true if fase with index, specified in face asset was recognized *@return face recognition flag (bool) */ - (BOOL)hasFace; /** *true if mouth is open *@return flag (bool) */ - (BOOL)isMouthOpen; /** *true if is smiling *@return flag (bool) */ - (BOOL)isSmiling; /** *true if eyebrows up *@return flag (bool) */ - (BOOL)isEyebrowsUp; /** *true if disgust *@return flag (bool) */ - (BOOL)isDisgust; /**@return eyes status (eyes_status) */ - (nonnull BNBEyesStatus *)getEyesStatus; /**@return ears status [left, right] */ - (nonnull NSArray<BNBEar *> *)getEars; /**@return upcast to base type */ - (nullable BNBComponent *)asComponent; /**@return gender */ - (BNBGender)getGender; @end
Swift
class BNBFaceTracker : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFeatureParameter : NSObject - (nonnull instancetype)initWithX:(float)x y:(float)y z:(float)z w:(float)w; + (nonnull instancetype)featureParameterWithX:(float)x y:(float)y z:(float)z w:(float)w; @property (nonatomic, readonly) float x; @property (nonatomic, readonly) float y; @property (nonatomic, readonly) float z; @property (nonatomic, readonly) float w; @end
Swift
class BNBFeatureParameter : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFrameData : NSObject /** Creates empty `FrameData`. Use `add*` function to fill it. */ + (nullable BNBFrameData *)create; - (nonnull BNBFullImageFormat *)getFullImgFormat; - (nonnull NSArray<NSNumber *> *)getFullImgTransform; /** Get frx_recognition_result or null if not exists */ - (nullable BNBFrxRecognitionResult *)getFrxRecognitionResult; - (void)setFrxRecognitionResult:(nullable BNBFrxRecognitionResult *)result; - (nonnull BNBActionUnitsData *)getActionUnits; - (nonnull BNBAcneRegions *)getAcneRegions; - (BOOL)getIsSmile; - (BOOL)getIsMouthOpen; - (BOOL)getIsBrowsRaised; - (BOOL)getIsBrowsShifted; - (BOOL)getIsWearGlasses; - (float)getRuler; - (nonnull BNBEyesState *)getEyesState; - (float)getLightCorrection; - (nonnull BNBTransformedMaskByte *)getBackground; - (nonnull BNBTransformedMaskGpu *)getBackgroundGpu; - (nonnull BNBTransformedMaskByte *)getHair; - (nonnull BNBTransformedMaskGpu *)getHairGpu; - (nonnull BNBTransformedMaskByte *)getSkin; - (nonnull BNBTransformedMaskGpu *)getSkinGpu; - (nonnull BNBTransformedMaskByte *)getLips; - (nonnull BNBTransformedMaskGpu *)getLipsGpu; - (nonnull BNBTransformedMaskByte *)getTeeth; - (nonnull BNBTransformedMaskByte *)getOcclusion; - (nonnull BNBTransformedMaskByte *)getBody; - (nonnull BNBLipsShineMask *)getLipsShine; - (nonnull BNBBrowsMask *)getBrows; - (nonnull BNBEyesMask *)getEyes; - (nonnull BNBTransformedMaskByte *)getFace; - (nonnull BNBTransformedMaskByte *)getFaceSkin; - (nullable NSString *)getFaceAttributes; /** Pupillary distance in mm */ - (float)getPupillaryDistance; - (void)addFullImg:(nonnull BNBFullImageData *)img; - (void)replaceFullImg:(nonnull BNBFullImageData *)img; - (void)addBackground:(nonnull BNBTransformedMaskByte *)mask; - (void)addExternalFaceData:(BNBFaceDataSource)source data:(nonnull NSArray<BNBExternalFaceData *> *)data; - (void)addDepthMap:(nonnull BNBDepthMap *)depthMap; - (void)addFrameNumber:(int64_t)frameNumber; - (void)addActionUnitsData:(nonnull BNBActionUnitsData *)actionUnits; /** * Extra parameters during in-CPU feature calculations. * Reference feature documentation. */ - (void)addFeatureParameters:(nonnull NSDictionary<NSNumber *, NSArray<BNBFeatureParameter *> *> *)params; /**add frame timestamp in microseconds */ - (void)addTimestampUs:(double)timestampUs; @end
Swift
class BNBFrameData : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFrameProcessor : NSObject /** Realtime feed processor. See RealtimeProcessorMode for more info. */ + (nullable BNBFrameProcessor *)createRealtimeProcessor:(BNBRealtimeProcessorMode)mode config:(nullable BNBProcessorConfiguration *)config; /** * Photo processor. `push` to set photo, processing happens on `pop` synchronously. * Several `pop` calls return same result without unnecessary processing, * except case when recognizer pipeline was changed by EffectPlayer, processing will be restarted. */ + (nullable BNBFrameProcessor *)createPhotoProcessor:(nullable BNBProcessorConfiguration *)config; /** Video processor. Consistent `push` - `pop` will process frames synchronously. */ + (nullable BNBFrameProcessor *)createVideoProcessor:(nullable BNBProcessorConfiguration *)config; - (BNBProcessorType)getType; - (void)push:(nullable BNBFrameData *)fd; - (nonnull BNBProcessorResult *)pop; @end
Swift
class BNBFrameProcessor : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFrxRecognitionResult : NSObject + (nullable BNBFrxRecognitionResult *)create; - (nonnull NSArray<BNBFaceData *> *)getFaces; - (void)setFaces:(nonnull NSArray<BNBFaceData *> *)faces; - (nonnull NSArray<NSNumber *> *)getTexCoords; - (nonnull NSArray<NSNumber *> *)getTriangles; - (nonnull BNBTransformableEvent *)getTransform; - (void)setTransform:(nonnull BNBTransformableEvent *)t; @end
Swift
class BNBFrxRecognitionResult : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBFullImageFormat : NSObject - (nonnull instancetype)initWithWidth:(int32_t)width height:(int32_t)height orientation:(BNBRotation)orientation; + (nonnull instancetype)fullImageFormatWithWidth:(int32_t)width height:(int32_t)height orientation:(BNBRotation)orientation; @property (nonatomic, readonly) int32_t width; @property (nonatomic, readonly) int32_t height; @property (nonatomic, readonly) BNBRotation orientation; @end
Swift
class BNBFullImageFormat : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBHand : NSObject /**@return hand name (string) */ - (nonnull NSString *)getName; /** *sets hand mesh. *@param mesh (mesh): hand mesh */ - (void)setMesh:(nullable BNBMesh *)mesh; /**@return hand mesh (mesh) */ - (nullable BNBMesh *)getMesh; - (BNBGestureType)getGesture; @end
Swift
class BNBHand : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBHandTracker : NSObject /** *Fabric method for hand creating. *@return created (hand_tracker). */ + (nullable BNBHandTracker *)create; /** *Sets hand to hand tracker. *@param hand (hand): hand asset */ - (void)setHand:(nullable BNBHand *)hand; /**@return hand (hand): hand asset */ - (nullable BNBHand *)getHand; /**@return tracker type. Can be hand_skelet or ring */ - (BNBHandTrackerType)getType; /**@return tracker type. Can be hand_skelet or ring */ - (void)setType:(BNBHandTrackerType)type; /**@return upcast to base type */ - (nullable BNBComponent *)asComponent; @end
Swift
class BNBHandTracker : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBImage : NSObject /**@return image name (string) */ - (nonnull NSString *)getName; /**@return image type. type of image subclass (enum, can be attachment, cubemap, segmentation_mask, texture, camera_texture, video, weighted_lut) */ - (BNBImageType)getType; /**cast to attachment subclass. May throw. */ - (nullable BNBAttachment *)asAttachment; /**cast to cubemap subclass. May throw. */ - (nullable BNBCubemap *)asCubemap; /**cast to segmentation_mask subclass. May throw. */ - (nullable BNBSegmentationMask *)asSegmentationMask; /**cast to texture subclass. May throw. */ - (nullable BNBTexture *)asTexture; /**cast to camera_texture subclass. May throw. */ - (nullable BNBCameraTexture *)asCameraTexture; /**cast to video subclass. May throw. */ - (nullable BNBVideo *)asVideo; /**cast to weighted_lut subclass. May throw. */ - (nullable BNBWeightedLut *)asWeightedLut; /**cast to text_texture subclass. May throw. */ - (nullable BNBTextTexture *)asTextTexture; - (nullable BNBProceduralTexture *)asProceduralTexture; @end
Swift
class BNBImage : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBImageReleaser : NSObject /** * Increments the reference count by 1 for an interface pointer to a object. * MUST be called before release(). */ - (void)addRef; /** * Increments the reference count by number for an interface pointer to a object. * @param number number of add ref. * MUST be called before release(). */ - (void)addRefCount:(int32_t)number; /** * Decrements the reference count for an interface on a COM object. * After the last ref is deleted, the java image will be closed(released). * MUST be called from the deleters of bnb::color_plane. */ - (void)release; @end
Swift
class BNBImageReleaser : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBInformer : NSObject /** Send event to Banuba Servers with custom key and value */ + (void)sendEvent:(nullable BNBLicenseManager *)manager key:(nonnull NSString *)key value:(nonnull NSString *)value; @end
Swift
class BNBInformer : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBInputManager : NSObject - (void)onTouchesBegan:(nonnull NSDictionary<NSNumber *, BNBTouch *> *)tocuhes; - (void)onTouchesMoved:(nonnull NSDictionary<NSNumber *, BNBTouch *> *)tocuhes; - (void)onTouchesEnded:(nonnull NSDictionary<NSNumber *, BNBTouch *> *)tocuhes; - (void)onTouchesCancelled:(nonnull NSDictionary<NSNumber *, BNBTouch *> *)tocuhes; - (void)onRotationGesture:(float)angle; - (void)onScaleGesture:(float)scale; - (void)onSwipeGesture:(float)dirX dirY:(float)dirY; - (void)onDoubleTapGesture:(nonnull BNBTouch *)pos; - (void)onLongTapGesture:(nonnull BNBTouch *)pos; - (void)onGestureEnded:(nonnull NSString *)id; @end
Swift
class BNBInputManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBLayer : NSObject /** *Fabric method for layer creating. *@return created layer (layer). */ + (nullable BNBLayer *)create:(nonnull NSString *)name; /** *set layer name *@param layer name (string) */ - (void)setName:(nonnull NSString *)name; /**@return layer name (string) */ - (nonnull NSString *)getName; /** *Set enable/disable layer flag. The disabled layer will not be rendered. *@param active (bool) activity flag. */ - (void)setActive:(BOOL)active; /**@return activity flag (bool) */ - (BOOL)isActive; /** *ability for enable/disable morphing in specified layer *@param enable (bool) */ - (void)enableMorphing:(BOOL)enable; /**@return is morphing enable in the current layer */ - (BOOL)isMorphingEnabled; @end
Swift
class BNBLayer : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBLicenseManager : NSObject /** Creates *new* `LicenceManager`. This metod won't change Banuba SDK internal state. */ + (nullable BNBLicenseManager *)create:(nonnull NSString *)clientToken; /** * Returns the instance used by Banuba SDK to check licence. * This istance was created by `UtilityManager.initialize`. */ + (nullable BNBLicenseManager *)instance; /** Checks if Client Token is expired. */ - (BNBLicenseStatus)isExpired; /** Returns decoded content of Client Token */ - (nonnull NSString *)getJson; /** Returns hash of Client Token */ - (nonnull NSString *)getChecksum; @end
Swift
class BNBLicenseManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBLipsShineMask : NSObject - (nonnull instancetype)initWithMeta:(nonnull BNBTransformedMaskByte *)meta vMin:(float)vMin vMax:(float)vMax; + (nonnull instancetype)lipsShineMaskWithMeta:(nonnull BNBTransformedMaskByte *)meta vMin:(float)vMin vMax:(float)vMax; /**shine_mask */ @property (nonatomic, readonly, nonnull) BNBTransformedMaskByte * meta; /**blending coeffcient */ @property (nonatomic, readonly) float vMin; @property (nonatomic, readonly) float vMax; @end
Swift
class BNBLipsShineMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMat2x4 : NSObject - (nonnull instancetype)initWithM11:(float)m11 m12:(float)m12 m13:(float)m13 m14:(float)m14 m21:(float)m21 m22:(float)m22 m23:(float)m23 m24:(float)m24; + (nonnull instancetype)mat2x4WithM11:(float)m11 m12:(float)m12 m13:(float)m13 m14:(float)m14 m21:(float)m21 m22:(float)m22 m23:(float)m23 m24:(float)m24; @property (nonatomic, readonly) float m11; @property (nonatomic, readonly) float m12; @property (nonatomic, readonly) float m13; @property (nonatomic, readonly) float m14; @property (nonatomic, readonly) float m21; @property (nonatomic, readonly) float m22; @property (nonatomic, readonly) float m23; @property (nonatomic, readonly) float m24; @end
Swift
class BNBMat2x4 : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMat3x4 : NSObject - (nonnull instancetype)initWithM11:(float)m11 m12:(float)m12 m13:(float)m13 m14:(float)m14 m21:(float)m21 m22:(float)m22 m23:(float)m23 m24:(float)m24 m31:(float)m31 m32:(float)m32 m33:(float)m33 m34:(float)m34; + (nonnull instancetype)mat3x4WithM11:(float)m11 m12:(float)m12 m13:(float)m13 m14:(float)m14 m21:(float)m21 m22:(float)m22 m23:(float)m23 m24:(float)m24 m31:(float)m31 m32:(float)m32 m33:(float)m33 m34:(float)m34; @property (nonatomic, readonly) float m11; @property (nonatomic, readonly) float m12; @property (nonatomic, readonly) float m13; @property (nonatomic, readonly) float m14; @property (nonatomic, readonly) float m21; @property (nonatomic, readonly) float m22; @property (nonatomic, readonly) float m23; @property (nonatomic, readonly) float m24; @property (nonatomic, readonly) float m31; @property (nonatomic, readonly) float m32; @property (nonatomic, readonly) float m33; @property (nonatomic, readonly) float m34; @end
Swift
class BNBMat3x4 : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMat4x4 : NSObject - (nonnull instancetype)initWithM11:(float)m11 m12:(float)m12 m13:(float)m13 m14:(float)m14 m21:(float)m21 m22:(float)m22 m23:(float)m23 m24:(float)m24 m31:(float)m31 m32:(float)m32 m33:(float)m33 m34:(float)m34 m41:(float)m41 m42:(float)m42 m43:(float)m43 m44:(float)m44; + (nonnull instancetype)mat4x4WithM11:(float)m11 m12:(float)m12 m13:(float)m13 m14:(float)m14 m21:(float)m21 m22:(float)m22 m23:(float)m23 m24:(float)m24 m31:(float)m31 m32:(float)m32 m33:(float)m33 m34:(float)m34 m41:(float)m41 m42:(float)m42 m43:(float)m43 m44:(float)m44; @property (nonatomic, readonly) float m11; @property (nonatomic, readonly) float m12; @property (nonatomic, readonly) float m13; @property (nonatomic, readonly) float m14; @property (nonatomic, readonly) float m21; @property (nonatomic, readonly) float m22; @property (nonatomic, readonly) float m23; @property (nonatomic, readonly) float m24; @property (nonatomic, readonly) float m31; @property (nonatomic, readonly) float m32; @property (nonatomic, readonly) float m33; @property (nonatomic, readonly) float m34; @property (nonatomic, readonly) float m41; @property (nonatomic, readonly) float m42; @property (nonatomic, readonly) float m43; @property (nonatomic, readonly) float m44; @end
Swift
class BNBMat4x4 : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMaterial : NSObject /**@return material name (string) */ - (nonnull NSString *)getName; /** *adds shader parameter to parameters list, after what you'll can get access to this parameter in shader by it's name. *Type of parameter in shader will match with type of parameter, except int, float, vector2, vector3, *this types will be replaces on vec4, which x component will have needed value, other components will be filled by garbage. *@param parameter (parameter): parameter to add */ - (void)addParameter:(nullable BNBParameter *)parameter; /**@return list of shader parameters (list<parameter>) */ - (nonnull NSArray<BNBParameter *> *)getParameters; /** *removes parameter from list. *@param parameter (parameter): parameter to remove */ - (void)removeParameter:(nullable BNBParameter *)parameter; /** *find parameter by name *@param name (string) *@return parameter (parameter) or null */ - (nullable BNBParameter *)findParameter:(nonnull NSString *)name; /** *set material geometry topology. *@param topology (geometry_topology): geometry topology type. Can be triangles_list, lines_list, points_list. Default: triangles_list */ - (void)setTopology:(BNBGeometryTopology)topology; /**@return current geometry topology (geometry_topology) */ - (BNBGeometryTopology)getCurrentTopology; /** *sets render state (i.e blending mode, color/depth writing, depth testing, etc.) *@param state (state) render state */ - (void)setState:(nonnull BNBState *)state; /**@return render state (state) */ - (nonnull BNBState *)getState; /** *add image sampler, after what you'll can get acess to image and sampler in shader by formula: image_index = i * 2. sampler_index = i * 2 + 1. *Where i is image index in images list (which you can get by get_images call). *Note that you need to declare images samplers in shader manually and sampler name in name must match with sampler name in material. *@param sampler (string): sampler name *@param image (image): sampler image */ - (void)addImage:(nonnull NSString *)sampler image:(nullable BNBImage *)image; /**@return list of samplers images (list<parameter>) */ - (nonnull NSArray<BNBImage *> *)getImages; /** *removes image from list (if exist). Will be ignored if effect was activated. *@param sampler (string): sampler name */ - (void)removeImage:(nonnull NSString *)sampler; /**@return list of samplers name (list<string>) */ - (nonnull NSArray<NSString *> *)getSamplers; /**@return compiled and combined shaders sources */ - (nonnull BNBShaderSource *)getShaderSource; @end
Swift
class BNBMaterial : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMedia : NSObject /** *set playback start position. *@param position (float): playback start position (seconds) */ - (void)setStartPosition:(float)position; /** *set playback end position. *@param position (float): playback end position (seconds) */ - (void)setEndPosition:(float)position; /** *set playback looping. *@param looped (bool): loop playback flag */ - (void)setLooped:(BOOL)looped; /**@return loop playback flag (bool) */ - (BOOL)isLooped; /**@return playback start position (float) */ - (float)getStartPosition; /**@return playback end position (float) */ - (float)getEndPosition; /**@return playback active flag. */ - (BOOL)isPlaying; /**starts video playback */ - (void)play; /**pause video playback */ - (void)pause; /**stop video playback */ - (void)stop; /**resume paused video playback */ - (void)resume; @end
Swift
class BNBMedia : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMesh : NSObject /**@return mesh name (string) */ - (nonnull NSString *)getName; /**@return sub geometries names list (list<string>) */ - (nonnull NSArray<NSString *> *)getSubGeometries; /**@return animations names list (list<string>) */ - (nonnull NSArray<NSString *> *)getAnimations; @end
Swift
class BNBMesh : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMeshInstance : NSObject /** *Fabric method for mesh_instance creating. *@return mesh_instance component (mesh_instance) */ + (nullable BNBMeshInstance *)create; /** *set mesh visibility flag. Will be overridden if entity with mesh_instance component is child of entity with face_tracker component. *@param visible(bool) visibility flag. */ - (void)setVisible:(BOOL)visible; /**@return visibility flag (bool) */ - (BOOL)isVisible; /** *set for mesh sub geometry with specified name specified material if sub geometry with given name exists. *@param subGeometryName (string) sub geometry name. *@param material (material) sub geometry material. */ - (void)setSubGeometryMaterial:(nonnull NSString *)subGeometryName material:(nullable BNBMaterial *)material; /** *returns material from mesh sub geometry with specified name if it exist, null otherwise *@param subGeometryName (string) sub geometry name. *@return sub geometry material (material). */ - (nullable BNBMaterial *)getSubGeometryMaterial:(nonnull NSString *)subGeometryName; /** *get materials for each sub geometry *@return materials (list<material>) */ - (nonnull NSArray<BNBMaterial *> *)getMaterials; /** *set mesh for given mesh instance. Of some mesh was settled before need to re set all materials. *@param mesh (mesh) new mesh. */ - (void)setMesh:(nullable BNBMesh *)mesh; /**@return mesh (mesh). */ - (nullable BNBMesh *)getMesh; /** *Change current animation if animation with specified name exist. *@param name (string) new animation. *@param mode (animation_mode). */ - (void)animationChange:(nonnull NSString *)animation mode:(BNBAnimationMode)mode; /**Start animation playback. */ - (void)animationPlay; /**pause animation playback. */ - (void)animationPause; /** *Set current animation playback position. *@param positionNs (long): position in ns. */ - (void)animationSeek:(int64_t)positionNs; /** *True if animation playback was started. *@return animation playback active flag (bool). */ - (BOOL)isAnimationPlaying; /** *True if animation playback stop. *@return animation playback active flag (bool). */ - (BOOL)isAnimationEnded; /**@return current setted animation name (string). */ - (nonnull NSString *)getAnimation; /**@return current setted animation mode (animation_mode). Can be off loop once once_reversed fixed. */ - (BNBAnimationMode)getAnimationMode; /**@return current animation playback position (long). */ - (int64_t)getAnimationPositionNs; /**@return current animation playback duration (long). */ - (int64_t)getAnimationDurationNs; /** *Returns current animation playback time offset from begin(0). Typycally equals animation position mod animation duration. *@return animation playback time offset (long). */ - (int64_t)getAnimationTimeOffsetNs; /** *Set current animation playback time offset from begin(0). duration. *@param timeNs (long): animation playback time offset. */ - (void)setAnimationTimeOffsetNs:(int64_t)timeNs; /**@return physics_simulator of current mesh_instance */ - (nullable BNBPhysicsSimulator *)getPhysicsSimulator; /**@return upcast to base type */ - (nullable BNBComponent *)asComponent; @end
Swift
class BNBMeshInstance : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBMorphing : NSObject /**@return morphing type (morphing_type) */ - (BNBMorphingType)getType; /**@return morphing name (string) */ - (nonnull NSString *)getName; /** *sets morphing warp mesh. If morhping type is beauty must be only "$builtin$meshes/beauty" mesh. *@param mesh (mesh): morphing warp mesh */ - (void)setWarpMesh:(nullable BNBMesh *)mesh; /**@return warp (mesh) */ - (nullable BNBMesh *)getWarpMesh; @end
Swift
class BNBMorphing : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBParameter : NSObject /** *Fabric method for parameter creating. *@param name (string): parameter name. *@return created parameter (parameter) */ + (nullable BNBParameter *)create:(nonnull NSString *)name; /**@return parameter name (string) */ - (nonnull NSString *)getName; /** *set parameter integer value. *@param value (int) */ - (void)setInteger:(int32_t)value; /**return parameter int value. Throw is type is not equal type, which was added earlier. */ - (int32_t)getInteger; /** *set parameter real value. *@param value (float) */ - (void)setReal:(float)value; /**return parameter f32 value. Throw is type is not equal type, which was added earlier. */ - (float)getReal; /** *set x of vec3/vec4 value only. *@param value (f32) */ - (void)setX:(float)value; /** *set y of vec3/vec4 value only. *@param value (f32) */ - (void)setY:(float)value; /** *set z of vec3/vec4 value only. *@param value (f32) */ - (void)setZ:(float)value; /** *set w of vec4 value only. *@param value (f32) */ - (void)setW:(float)value; /** *set parameter vec3 value. *@param value (vec3) */ - (void)setVector3:(nonnull BNBVec3 *)value; /**return parameter vec3 value. Throw is type is not equal type, which was added earlier. */ - (nonnull BNBVec3 *)getVector3; /** *set parameter vec4 value. *@param value (vec4) */ - (void)setVector4:(nonnull BNBVec4 *)value; /**return parameter vec4 value. Throw is type is not equal type, which was added earlier. */ - (nonnull BNBVec4 *)getVector4; /** *set parameter mat2x4 value. *@param value (mat2x4) */ - (void)setMat2x4:(nonnull BNBMat2x4 *)value; /**return parameter mat2x4 value. Throw is type is not equal type, which was added earlier. */ - (nonnull BNBMat2x4 *)getMat2x4; /** *set parameter mat3x4 value. *@param value (mat3x4) */ - (void)setMat3x4:(nonnull BNBMat3x4 *)value; /**return parameter mat3x4 value. Throw is type is not equal type, which was added earlier. */ - (nonnull BNBMat3x4 *)getMat3x4; /** *set parameter mat4x4 value. *@param value (mat4x4) */ - (void)setMat4x4:(nonnull BNBMat4x4 *)value; /**return parameter mat4x4 value. Throw is type is not equal type, which was added earlier. */ - (nonnull BNBMat4x4 *)getMat4x4; @end
Swift
class BNBParameter : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBPhysicsSimulator : NSObject /** *Sets gravitation vector. *@param gravity (vec3): gravity value */ - (void)setGravity:(nonnull BNBVec3 *)gravity; /** *Sets damping value. *@param damping (float): damping value */ - (void)setDamping:(float)damping; /** *Sets inverse bone mass. *@param boneName (string): bone name *@param value (float): inverse bone mass */ - (void)setInvMass:(nonnull NSString *)boneName value:(float)value; /** *Add sphere collider. *@param sphereIndex (int): index for sphere *@param center (vec3): sphere center in world space *@param radius (float): sphere radius */ - (void)setSphereCollider:(int32_t)sphereIndex center:(nonnull BNBVec3 *)center radius:(float)radius; /** *Add constraint between bone1 and bone2. *@param bone1Name (string): from bone name *@param bone2Name (string): to bone name *@param distance (float): constaint length */ - (void)setConstraint:(nonnull NSString *)bone1Name bone2Name:(nonnull NSString *)bone2Name distance:(float)distance; /** *Sets bonesInMvSpace flag *false for legacy effects with special vertex shaders *true for using same vertex shaders as for non-physics meshes */ - (void)setBonesInMvSpace:(BOOL)bonesInMvSpace; /**Reset simulator to default state */ - (void)reset; @end
Swift
class BNBPhysicsSimulator : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBPixelBuffer : NSObject - (nonnull instancetype)initWithData:(nonnull NSData *)data format:(BNBPixelFormat)format width:(int32_t)width heigth:(int32_t)heigth; + (nonnull instancetype)pixelBufferWithData:(nonnull NSData *)data format:(BNBPixelFormat)format width:(int32_t)width heigth:(int32_t)heigth; @property (nonatomic, readonly, nonnull) NSData * data; @property (nonatomic, readonly) BNBPixelFormat format; @property (nonatomic, readonly) int32_t width; @property (nonatomic, readonly) int32_t heigth; @end
Swift
class BNBPixelBuffer : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBPixelRect : NSObject - (nonnull instancetype)initWithX:(int32_t)x y:(int32_t)y w:(int32_t)w h:(int32_t)h; + (nonnull instancetype)pixelRectWithX:(int32_t)x y:(int32_t)y w:(int32_t)w h:(int32_t)h; @property (nonatomic, readonly) int32_t x; @property (nonatomic, readonly) int32_t y; @property (nonatomic, readonly) int32_t w; @property (nonatomic, readonly) int32_t h; @end
Swift
class BNBPixelRect : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBPoint2d : NSObject - (nonnull instancetype)initWithX:(float)x y:(float)y; + (nonnull instancetype)point2dWithX:(float)x y:(float)y; @property (nonatomic, readonly) float x; @property (nonatomic, readonly) float y; @end
Swift
class BNBPoint2d : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBProceduralTexture : NSObject - (BNBProceduralAlgorithmType)getAlgorithmType; - (void)setSrcImage:(nullable BNBImage *)src; - (nullable BNBImage *)getSrcImage; /**@return upcast to base type */ - (nullable BNBImage *)asImage; - (nullable BNBCameraComposer *)asCameraComposer; @end
Swift
class BNBProceduralTexture : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBProcessorConfiguration : NSObject /** Create with default params */ + (nullable BNBProcessorConfiguration *)create; /** * Use future frame to filter prediction, improves anti-jitter, adds processed frame inconsistency * Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ... * Cannot be used together with other configurations * Default: true */ - (void)setUseFutureFilter:(BOOL)value; /** * Use future frame to interpolate prediction, improves performance, adds processed frame inconsistency * Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ... * Cannot be used together with other configurations * Default: false */ - (void)setUseFutureInterpolate:(BOOL)value; /** * Use offline NN's for processing, improces accuracy in exchange to performance * Cannot be used together with other configurations * Default: false */ - (void)setUseOfflineMode:(BOOL)value; @end
Swift
class BNBProcessorConfiguration : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBProcessorResult : NSObject - (nonnull instancetype)initWithStatus:(BNBProcessorStatus)status frameData:(nullable BNBFrameData *)frameData; + (nonnull instancetype)processorResultWithStatus:(BNBProcessorStatus)status frameData:(nullable BNBFrameData *)frameData; @property (nonatomic, readonly) BNBProcessorStatus status; @property (nonatomic, readonly, nullable) BNBFrameData * frameData; @end
Swift
class BNBProcessorResult : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBRecognizer : NSObject + (nullable BNBRecognizer *)create:(BNBRecognizerMode)mode; + (int64_t)getFeatureId:(BNBFeatureId)feature; - (nullable id<BNBFeature>)getFeature:(BNBFeatureId)feature; - (void)setFeatures:(nonnull NSSet<NSNumber *> *)features; - (void)addFeature:(nullable id<BNBFeature>)feature dependencies:(nonnull NSSet<NSNumber *> *)dependencies; - (void)removeFeature:(nullable id<BNBFeature>)feature; /** sets maximum allowed face results, if face tracking feature is present */ - (void)setMaxFaces:(int32_t)num; - (void)setOfflineMode:(BOOL)on; /** * Set future frame filtrarion mode. * Produce smoother recognition result (anti jitter), however adds inconsistency in push'ed/pop'ed frames (one frame lag) * Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled. * Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ... */ - (void)setUseFutureFilter:(BOOL)on; /** * Set future frame interpolation mode. * Produce faster recognition result (skip even frames), however adds inconsistency in push'ed/pop'ed frames (one frame lag) * Applied only in push_camera_frame/pop_frame_data methods, when offline mode is disabled. * Example: push frame 1 - pop frame 1, push frame 2 - pop frame 1, push frame 3 - pop frame 2, ... */ - (void)setUseFutureInterpolate:(BOOL)on; - (void)process:(nullable BNBFrameData *)frameData; - (void)pushCameraFrame:(nullable BNBFrameData *)inputFrameData; - (BOOL)popFrameData:(nullable BNBFrameData *)outputFrameData; /** start the recognizer */ - (void)start; /** pause the recognizer */ - (void)pause; /** pause + clear */ - (void)stop; /** clear input and output buffers and pipeline state, also clean cached features */ - (void)clear; @end
Swift
class BNBRecognizer : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBReloadResult : NSObject /** * Effect with updated config applied. Depending on * changes it may be the effect already loaded or a new one. */ - (nullable BNBEffect *)effect; /** * In case it was possible to apply the new config on the same * effect, this flag will be `true`. */ - (BOOL)hotReload; @end
Swift
class BNBReloadResult : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBRenderInfo : NSObject /** Recognition engine version */ + (int32_t)getFrxVersion; /** Platfrom name: ios, android */ + (nonnull NSString *)getPlatform; /** Render engine versio. Currently the same as SDK version. E.g.: `1.2.1-g8970518da` */ + (nonnull NSString *)getEngineVersion; @end
Swift
class BNBRenderInfo : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBRenderList : NSObject /** *Fabric method for render_list creating. *@return created render list (render_list). */ + (nullable BNBRenderList *)create:(nonnull NSString *)name; /** *Set name of the render list *@param name (string) */ - (void)setName:(nonnull NSString *)name; /**@return name (string) of the render list */ - (nonnull NSString *)getName; - (int64_t)getTasksCount; /** *add render task to layer. *@param layer (layer): entities layer. *@param target (render_target): needed render target. Do not change if previous target was the same. (Target changing will trigger start/finish behavior.) *@param subGeoms (optional<list<string>>): if specified: only sub geometries from this list will be rendered. */ - (int32_t)addTask:(nullable BNBLayer *)layer target:(nullable BNBRenderTarget *)target subGeoms:(nullable NSArray<NSString *> *)subGeoms; /**add blit task to layer. */ - (void)addBlitTargetToTask:(nullable BNBRenderTarget *)dst taskIndex:(int32_t)taskIndex; /** *return render rask layer, by render task index. Throw if index >= tasks size. *@param taskIndex (int): render task index. *@return task layer (layer) */ - (nullable BNBLayer *)getTaskLayer:(int32_t)taskIndex; /** *return render selected task sub geometries. If list is empty - all sub geometries will be rendered *@param taskIndex (int): render task index. *@return sub geometries list (list<string>): list of sub geometries to render */ - (nonnull NSArray<NSString *> *)getTaskSubGeometries:(int32_t)taskIndex; /** *return render rask render target, by render task index. Throw if index >= tasks size. *@param taskIndex (int): render task index. *@return task render target (render_target) */ - (nullable BNBRenderTarget *)getTaskTarget:(int32_t)taskIndex; /**Remove all render tasks. */ - (void)clear; @end
Swift
class BNBRenderList : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBRenderTarget : NSObject /**@return render target name (string) */ - (nonnull NSString *)getName; /**@param samples (int) msaa samples counts */ - (void)setSamplesCount:(int32_t)samples; /**@return msaa samples counts */ - (int32_t)getSamplesCount; /** *set render target surface extent *@param width (int): surface width *@param height (int): surface height */ - (void)setExtent:(int32_t)width height:(int32_t)height; /**@return render target width (int) */ - (int32_t)getWidth; /**@return render target height (int) */ - (int32_t)getHeight; /** *set render target surface extent scale *@param width (int): surface width scale *@param height (int): surface height scale */ - (void)setScale:(float)scale; /**@return render target width scale (int) */ - (float)getScale; /** *add color or depth attachment to render target *@param attachment (image): surface attachment */ - (void)addAttachment:(nullable BNBImage *)attachment; /** *removes color or depth attachment from render target, if it was aded early *@param attachment (image): surface attachment */ - (void)removeAttachment:(nullable BNBImage *)attachment; /**@returns list of added attachments (list<image>). */ - (nonnull NSArray<BNBImage *> *)getAttachments; /**request reading specific pixel from color attachment at the end of the frame */ - (void)requestReadPixel:(int32_t)x y:(int32_t)y; @end
Swift
class BNBRenderTarget : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBRendererCommon : NSObject /** return rgba image, srcImage can be rgb or rgba */ + (nonnull BNBFullImageData *)morphMesh:(nonnull BNBFullImageData *)srcImage originalVerts:(nonnull NSArray<NSNumber *> *)originalVerts morphedVerts:(nonnull NSArray<NSNumber *> *)morphedVerts indices:(nonnull NSArray<NSNumber *> *)indices mvp:(nonnull NSArray<NSNumber *> *)mvp; /** return rgba image, srcImage can be rgb or rgba */ + (nonnull BNBBnbMorphResult *)morphMeshLandmarks:(nonnull BNBFullImageData *)srcImage srcLandmarks:(nonnull NSArray<NSNumber *> *)srcLandmarks originalVerts:(nonnull NSArray<NSNumber *> *)originalVerts morphedVerts:(nonnull NSArray<NSNumber *> *)morphedVerts indices:(nonnull NSArray<NSNumber *> *)indices mvp:(nonnull NSArray<NSNumber *> *)mvp; @end
Swift
class BNBRendererCommon : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBResource : NSObject - (BOOL)loaded; - (nonnull NSString *)path; @end
Swift
class BNBResource : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBScene : NSObject /** Set a new name for a scene. The name could be empty. */ - (void)setName:(nonnull NSString *)name; /** Get a scene name. */ - (nonnull NSString *)getName; /** Get the root of entities hierarchy. It always exists and has a name "Root". */ - (nullable BNBEntity *)getRoot; /** Get the AssetManager of a current scene. It always exists. */ - (nullable BNBAssetManager *)getAssetManager; - (void)addLayer:(nullable BNBLayer *)layer; - (nonnull NSArray<BNBLayer *> *)getLayers; /** Get all components present in this scene of specified type */ - (nonnull NSArray<BNBComponent *> *)getComponents:(BNBComponentType)type; /** Return first found layer with name `layerName` or NULL if such layer doesn't exist. */ - (nullable BNBLayer *)getLayer:(nonnull NSString *)layerName; - (void)removeLayer:(nullable BNBLayer *)layer; - (void)setRenderList:(nullable BNBRenderList *)renderList; - (nullable BNBRenderList *)getRenderList; - (void)clearRenderList; - (nullable BNBCamera *)getCamera; - (void)enableRecognizerFeature:(BNBFeatureId)feature; - (void)disableRecognizerFeature:(BNBFeatureId)feature; - (void)addFeatureParam:(BNBFeatureId)feature params:(nonnull NSArray<BNBFeatureParameter *> *)params; - (void)addEffectEvent:(nonnull NSString *)name params:(nonnull NSDictionary<NSString *, NSString *> *)params; - (BNBTriggerStatusType)getTriggerStatus:(BNBTriggerType)trigger; - (nullable BNBEntity *)createEntity:(nonnull NSString *)name; - (int64_t)getNativeContext; - (int32_t)getSurfaceWidth; - (int32_t)getSurfaceHeight; /** *find global material parameter by name *@param name (string) *@return parameter (parameter) or null */ - (nullable BNBParameter *)findGlobalMaterialParameter:(nonnull NSString *)name; @end
Swift
class BNBScene : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBSegmentationMask : NSObject /**@return segmentation mask type. Can be background, hair, skin, lips, l_eye, r_eye. */ - (BNBSegmentationMaskType)getMaskType; /** *set segmentation mask activity flag *@param active (bool): segmentation mask activity flag */ - (void)setActive:(BOOL)active; /**@return segmentation mask activity flag (bool). */ - (BOOL)isActive; /**@return upcast to base type */ - (nullable BNBImage *)asImage; @end
Swift
class BNBSegmentationMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBShaderSource : NSObject - (nonnull instancetype)initWithVs:(nonnull NSString *)vs fs:(nonnull NSString *)fs; + (nonnull instancetype)shaderSourceWithVs:(nonnull NSString *)vs fs:(nonnull NSString *)fs; @property (nonatomic, readonly, nonnull) NSString * vs; @property (nonatomic, readonly, nonnull) NSString * fs; @end
Swift
class BNBShaderSource : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBSize : NSObject - (nonnull instancetype)initWithWidth:(int32_t)width height:(int32_t)height; + (nonnull instancetype)sizeWithWidth:(int32_t)width height:(int32_t)height; @property (nonatomic, readonly) int32_t width; @property (nonatomic, readonly) int32_t height; @end
Swift
class BNBSize : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBState : NSObject - (nonnull instancetype)initWithBlending:(BNBBlendingMode)blending zWrite:(BOOL)zWrite zTest:(BOOL)zTest colorWrite:(BOOL)colorWrite backFaces:(BOOL)backFaces coverage:(BOOL)coverage; + (nonnull instancetype)stateWithBlending:(BNBBlendingMode)blending zWrite:(BOOL)zWrite zTest:(BOOL)zTest colorWrite:(BOOL)colorWrite backFaces:(BOOL)backFaces coverage:(BOOL)coverage; @property (nonatomic, readonly) BNBBlendingMode blending; @property (nonatomic, readonly) BOOL zWrite; @property (nonatomic, readonly) BOOL zTest; @property (nonatomic, readonly) BOOL colorWrite; @property (nonatomic, readonly) BOOL backFaces; @property (nonatomic, readonly) BOOL coverage; @end
Swift
class BNBState : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBSurfaceData : NSObject - (nonnull instancetype)initWithGpuDevicePtr:(int64_t)gpuDevicePtr commandQueuePtr:(int64_t)commandQueuePtr surfacePtr:(int64_t)surfacePtr; + (nonnull instancetype)surfaceDataWithGpuDevicePtr:(int64_t)gpuDevicePtr commandQueuePtr:(int64_t)commandQueuePtr surfacePtr:(int64_t)surfacePtr; /** Pointer to device gpu */ @property (nonatomic, readonly) int64_t gpuDevicePtr; /** Pointer to gpu command queue */ @property (nonatomic, readonly) int64_t commandQueuePtr; /** Pointer to render layer */ @property (nonatomic, readonly) int64_t surfacePtr; @end
Swift
class BNBSurfaceData : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTextTexture : NSObject - (void)loadResource:(nullable BNBResource *)res; - (int32_t)getWidth; - (int32_t)getHeight; - (void)setWidth:(int32_t)value; - (void)setHeight:(int32_t)value; - (void)setText:(nonnull NSString *)text; - (nonnull NSString *)getText; - (void)setFont:(nonnull NSString *)path; - (nonnull NSString *)getFont; /**@return upcast to base type */ - (nullable BNBImage *)asImage; @end
Swift
class BNBTextTexture : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTexture : NSObject - (void)loadResource:(nullable BNBResource *)res; /** *Load texture data from specified file descriptor. *@param fd (i32): file descriptor, should be closed on the caller side. */ - (void)loadByFd:(int32_t)fd; /** *Load texture data from specified file name. For now only supported .png, .jpeg, .jpg, .ktx (2d) images. *@param fileName (string): absolute path for image file */ - (void)load:(nonnull NSString *)fileName; /**@return width (int) of loaded image */ - (int32_t)getWidth; /**@return height (int) of loaded image */ - (int32_t)getHeight; /**@return channels count of loaded image (R, RG, RGBA, i.e. 1, 2, or 4). */ - (int32_t)getLayers; /** *set mimpap generation flag. (affect only on ogl backend). *@param enable (bool): mipmap generation enable flag. */ - (void)setMips:(BOOL)enable; /**@return flag (bool) : mimpap generation flag */ - (BOOL)hasMips; /** *enable/disable texture tiling *@param enable (bool): tiled wrapping flag */ - (void)setTiling:(BOOL)enable; /**@return tiled texture wrapping flag (bool). */ - (BOOL)getTiling; /** *set texture filtering mode *param mode (texture_filtering_mode) */ - (void)setFiltering:(BNBTextureFilteringMode)type; /**@return filtering mode (texture_filtering_mode) */ - (BNBTextureFilteringMode)getFilteringMode; /**@return upcast to base type */ - (nullable BNBImage *)asImage; @end
Swift
class BNBTexture : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTouch : NSObject - (nonnull instancetype)initWithX:(float)x y:(float)y id:(int64_t)id; + (nonnull instancetype)touchWithX:(float)x y:(float)y id:(int64_t)id; @property (nonatomic, readonly) float x; @property (nonatomic, readonly) float y; @property (nonatomic, readonly) int64_t id; @end
Swift
class BNBTouch : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTransformableEvent : NSObject - (nonnull instancetype)initWithBasisTransform:(nonnull NSArray<NSNumber *> *)basisTransform fullRoi:(nonnull BNBPixelRect *)fullRoi; + (nonnull instancetype)transformableEventWithBasisTransform:(nonnull NSArray<NSNumber *> *)basisTransform fullRoi:(nonnull BNBPixelRect *)fullRoi; /** (common -> some event data basis) transformation */ @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * basisTransform; /** rectangle area in common basis that encloses all valid & usable data */ @property (nonatomic, readonly, nonnull) BNBPixelRect * fullRoi; @end
Swift
class BNBTransformableEvent : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTransformation : NSObject /** Constructs identity transform */ + (nullable BNBTransformation *)makeIdentity; /** Constructs from mat_t */ + (nullable BNBTransformation *)makeData:(nonnull NSArray<NSNumber *> *)mat; /** Constructs rotate transformation */ + (nullable BNBTransformation *)makeRot:(BNBRotation)rot; /** Constructs affine transformation */ + (nullable BNBTransformation *)makeAffine:(float)scaleX scaleY:(float)scaleY tX:(float)tX tY:(float)tY rot:(BNBRotation)rot flipX:(BOOL)flipX flipY:(BOOL)flipY; /** * Constructs transformation from source to target rectangle * Rotation and flips are around rectangles' center */ + (nullable BNBTransformation *)makeRects:(nonnull BNBPixelRect *)sourceRect targetRect:(nonnull BNBPixelRect *)targetRect rot:(BNBRotation)rot flipX:(BOOL)flipX flipY:(BOOL)flipY; /** * Applies transform t after this * e.g. {rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated) */ - (nullable BNBTransformation *)chainRight:(nullable BNBTransformation *)t; /** Apply transform to point */ - (nonnull BNBPoint2d *)transformPoint:(nonnull BNBPoint2d *)p; - (nonnull BNBPixelRect *)transformRect:(nonnull BNBPixelRect *)rect; - (BOOL)equals:(nullable BNBTransformation *)t; /** * Get the inverse of the transformation * @throw std::logic_error when matrix is singular */ - (nullable BNBTransformation *)inverseJ; /** Clone the transformation */ - (nullable BNBTransformation *)cloneJ; /** Returns 3x3 row-maj transform matrix */ - (nonnull NSArray<NSNumber *> *)getMatJ; @end
Swift
class BNBTransformation : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTransformation3d : NSObject /** *Fabric method for transformation creating. *@return transformation component (transformation) */ + (nullable BNBTransformation3d *)create; /** *Sets transformation translation value. *@param position (vec3): translation value. */ - (void)setTranslation:(nonnull BNBVec3 *)position; /**@return translation value (vec3). */ - (nonnull BNBVec3 *)getTranslation; /** *Sets transformation rotations angles. Angles must be in radians. Order of rotations is XYZ. *@param angles (vec3): rotation value. */ - (void)setRotation:(nonnull BNBVec3 *)angles; /**@return rotation value (vec3). */ - (nonnull BNBVec3 *)getRotation; /** *Sets transformation scale value. *@param scale (vec3): scale value. */ - (void)setScale:(nonnull BNBVec3 *)factor; /**@return scale value (vec3). */ - (nonnull BNBVec3 *)getScale; /**@return upcast to base type */ - (nullable BNBComponent *)asComponent; @end
Swift
class BNBTransformation3d : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTransformedMask : NSObject - (nonnull instancetype)initWithWidth:(int32_t)width height:(int32_t)height channel:(int32_t)channel inverse:(BOOL)inverse basisTransform:(nonnull NSArray<NSNumber *> *)basisTransform; + (nonnull instancetype)transformedMaskWithWidth:(int32_t)width height:(int32_t)height channel:(int32_t)channel inverse:(BOOL)inverse basisTransform:(nonnull NSArray<NSNumber *> *)basisTransform; @property (nonatomic, readonly) int32_t width; @property (nonatomic, readonly) int32_t height; @property (nonatomic, readonly) int32_t channel; @property (nonatomic, readonly) BOOL inverse; /** (common -> mask) transformation */ @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * basisTransform; @end
Swift
class BNBTransformedMask : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTransformedMaskByte : NSObject - (nonnull instancetype)initWithMeta:(nonnull BNBTransformedMask *)meta mask:(nonnull NSArray<NSNumber *> *)mask; + (nonnull instancetype)transformedMaskByteWithMeta:(nonnull BNBTransformedMask *)meta mask:(nonnull NSArray<NSNumber *> *)mask; @property (nonatomic, readonly, nonnull) BNBTransformedMask * meta; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * mask; @end
Swift
class BNBTransformedMaskByte : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTransformedMaskFloat : NSObject - (nonnull instancetype)initWithMeta:(nonnull BNBTransformedMask *)meta mask:(nonnull NSArray<NSNumber *> *)mask; + (nonnull instancetype)transformedMaskFloatWithMeta:(nonnull BNBTransformedMask *)meta mask:(nonnull NSArray<NSNumber *> *)mask; @property (nonatomic, readonly, nonnull) BNBTransformedMask * meta; @property (nonatomic, readonly, nonnull) NSArray<NSNumber *> * mask; @end
Swift
class BNBTransformedMaskFloat : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBTransformedMaskGpu : NSObject - (nonnull instancetype)initWithMeta:(nonnull BNBTransformedMask *)meta mask:(int32_t)mask; + (nonnull instancetype)transformedMaskGpuWithMeta:(nonnull BNBTransformedMask *)meta mask:(int32_t)mask; @property (nonatomic, readonly, nonnull) BNBTransformedMask * meta; @property (nonatomic, readonly) int32_t mask; @end
Swift
class BNBTransformedMaskGpu : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBUtilityManager : NSObject + (void)initialize:(nonnull NSArray<NSString *> *)resourcePaths clientToken:(nonnull NSString *)clientToken; + (void)release; /** Add resources search path */ + (void)addResourcePath:(nonnull NSString *)resourcePath; /** Remove resources search path */ + (void)removeResourcePath:(nonnull NSString *)resourcePath; /** Diagnostic crash. Use this to check you crash analytics systems. */ + (void)diagnosticCrash; /** * Get information about CPU capabilities. Mainly for usage on Android * @return JSON-string describing CPU capabilties */ + (nonnull NSString *)cpuEnv; /** * Check device SoC class. * On Android first call may require presence of OpenGL context to * get info about GPU. * @return hardware class of device */ + (BNBHardwareClass)getHardwareClass; + (void)setLogLevel:(BNBSeverityLevel)level; /** * Turns on SDK feature - analytics collection * @param outputFolder here log files would be written * could be documents directory for mobile apps */ + (void)enableDiagnostics:(nonnull NSString *)outputFolder; /** Turns on SDK feature - telemetry collection */ + (void)enableTelemetry; /** * Set callback to recieve log events from Banuba SDK. * @param cb Callback * @param lvl recieve logs with specified and higher levels */ + (void)setLogRecordCallback:(nullable id<BNBLogRecordCallback>)cb lvl:(BNBSeverityLevel)lvl; /** Returns SDK version as string */ + (nonnull NSString *)getBanubaSdkVersionString; /** * Returns SDK version as number * major = version / 10000000 * minor = (version - major * 10000000) / 100000 * patch = (version - major * 10000000 - minor * 100000) / 1000 * revision = version % 1000 */ + (int32_t)getBanubaSdkVersion; /** * The Banuba SDK tracks the resource version it built for. * Returns version of resources as string, represented in the following format * “Major.Minor.Patch”. */ + (nonnull NSString *)getBanubaSdkResourcesVersionString; /** * Returns version as number * major = version / 10000000 * minor = (version - major * 10000000) / 100000 * patch = (version - major * 10000000 - minor * 100000) / 1000 * revision = version % 1000 */ + (int32_t)getBanubaSdkResourcesVersion; /** * The Banuba SDK supports external resources archives. * After the initialization of the Banuba SDK, * API provides the capability to request the version of the archive. * Returns version of resources archive as string, * represented in the following format “Major.Minor.Patch”. * Such a version coincides with the Banuba SDK resources version * if no external resources are used. */ + (nonnull NSString *)getBanubaSdkResourcesVersionArchiveString; /** * Checks if the current version of resources * is equal to Banuba SDK expected resources version */ + (BOOL)checkBanubaSdkResourcesVersion; /** Checks if Banuba SDK treats as valid the version of external resources */ + (BOOL)checkBanubaSdkResourcesVersionIgnorePatch; /** * load GL functions, for dynamic libraries only * should be called with active GL context */ + (void)loadGlFunctions; @end
Swift
class BNBUtilityManager : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBVec3 : NSObject - (nonnull instancetype)initWithX:(float)x y:(float)y z:(float)z; + (nonnull instancetype)vec3WithX:(float)x y:(float)y z:(float)z; @property (nonatomic, readonly) float x; @property (nonatomic, readonly) float y; @property (nonatomic, readonly) float z; @end
Swift
class BNBVec3 : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBVec4 : NSObject - (nonnull instancetype)initWithX:(float)x y:(float)y z:(float)z w:(float)w; + (nonnull instancetype)vec4WithX:(float)x y:(float)y z:(float)z w:(float)w; @property (nonatomic, readonly) float x; @property (nonatomic, readonly) float y; @property (nonatomic, readonly) float z; @property (nonatomic, readonly) float w; @end
Swift
class BNBVec4 : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBVideo : NSObject /**@return current loaded video file (string). */ - (nonnull NSString *)getCurrentVideo; /**@return current loaded video pixels width (int). */ - (int32_t)getWidth; /**@return current loaded video pixels height (int). */ - (int32_t)getHeight; /** *Load video file for decoding. *@param file_name (string): absolute path for video file. */ - (void)load:(nonnull NSString *)videoPath onLoadingFinished:(nullable id<BNBVideoLoadingResultListener>)onLoadingFinished; /** *Load video file for decoding by file descriptor. *@param fd (i32): file descriptor, should be closed on the caller side. */ - (void)loadByFd:(int32_t)fd onLoadingFinished:(nullable id<BNBVideoLoadingResultListener>)onLoadingFinished; /**cast video to media parent class (media). */ - (nullable BNBMedia *)asMedia; /**@return upcast to image type */ - (nullable BNBImage *)asImage; /** Video own rotation angle */ - (float)getRotationAngle; /** *set gpu video texture filtering mode *param mode (texture_filtering_mode) */ - (void)setFilteringMode:(BNBTextureFilteringMode)value; /**@return filtering mode (texture_filtering_mode) */ - (BNBTextureFilteringMode)getFilteringMode; @end
Swift
class BNBVideo : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBVisualClip : NSObject /** * Create instance of visual clip processor * @param musicDbPath absolute path to folder with music info * @param effectsTemplatesPath absolute path to folder with effects templates * @param listener callback */ + (nullable BNBVisualClip *)create:(nonnull NSString *)musicDbPath effectsTemplatesPath:(nonnull NSString *)effectsTemplatesPath listener:(nullable id<BNBVisualClipListener>)listener; /** * Process video and get recomendations * @param videos array of videos to process * @param numFrames number of frames in video to process * @param resultSize number of recomendations in result array * @return array of recomendations, each is json, sorted by relevance */ - (nonnull NSArray<NSString *> *)process:(nonnull NSArray<BNBVisualClipVideo *> *)videos numFrames:(int32_t)numFrames resultSize:(int32_t)resultSize; @end
Swift
class BNBVisualClip : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBVisualClipVideo : NSObject - (nonnull instancetype)initWithPath:(nonnull NSString *)path startPosition:(float)startPosition duration:(float)duration; + (nonnull instancetype)visualClipVideoWithPath:(nonnull NSString *)path startPosition:(float)startPosition duration:(float)duration; /** absolute path to video */ @property (nonatomic, readonly, nonnull) NSString * path; /** start position in seconds */ @property (nonatomic, readonly) float startPosition; /** duration in seconds */ @property (nonatomic, readonly) float duration; @end
Swift
class BNBVisualClipVideo : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface BNBWeightedLut : NSObject - (void)loadResource:(nullable BNBResource *)res; - (void)setWeight:(float)value; - (float)getWeight; - (void)load:(nonnull NSString *)fileName; /**@return upcast to base type */ - (nullable BNBImage *)asImage; @end
Swift
class BNBWeightedLut : NSObject
-
Container for image data designed for Banuba SDK.
See moreDeclaration
Objective-C
@interface BNBFullImageData : NSObject
Swift
class BNBFullImageData : NSObject
-
Various helper method to improve Obj-C – Swift interoperability.
See moreDeclaration
Objective-C
@interface BNBObjC : NSObject
Swift
class BNBObjC : NSObject
-
Deprecated
Use the Player API instead
All methods must be called from the same thread (in which the object was created BNBOffscreenEffectPlayer) All methods are synchronous
WARNING: the SDK should be initialized with BNBUtilityManager before BNBOfscreenEffectPlayer creation
See moreDeclaration
Objective-C
@interface BNBOffscreenEffectPlayer : NSObject
Swift
class BNBOffscreenEffectPlayer : NSObject