BNBFaceMorphing

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

  • Fabric method for face_morphing creating.

    Declaration

    Objective-C

    + (nullable BNBFaceMorphing *)create:(BNBMorphingType)type;

    Swift

    class func create(_ type: BNBMorphingType) -> BNBFaceMorphing?

    Return Value

    created (face_morphing).

  • Sets morphing asset.

    Declaration

    Objective-C

    - (void)setMorphing:(nullable BNBMorphing *)morph;

    Swift

    func setMorphing(_ morph: BNBMorphing?)

    Parameters

    morph

    (morphing) morphing instance.

  • Declaration

    Objective-C

    - (nullable BNBMorphing *)getMorphing;

    Swift

    func getMorphing() -> BNBMorphing?

    Return Value

    setted morphing (morphing).

  • Cast to beauty_morphing subclass.

    Declaration

    Objective-C

    - (nullable BNBBeautyMorphing *)asBeautyMorphing;

    Swift

    func asBeautyMorphing() -> BNBBeautyMorphing?
  • Declaration

    Objective-C

    - (BOOL)isVisible;

    Swift

    func isVisible() -> Bool

    Return Value

    visible(bool) visibility flag.

  • 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.

    Declaration

    Objective-C

    - (void)setVisible:(BOOL)visible;

    Swift

    func setVisible(_ visible: Bool)

    Parameters

    visible(bool)

    visibility flag.

  • set morphing weight. Must be in range [0, 1]

    Declaration

    Objective-C

    - (void)setWeight:(float)weight;

    Swift

    func setWeight(_ weight: Float)

    Parameters

    weight

    (float)

  • Declaration

    Objective-C

    - (float)getWeight;

    Swift

    func getWeight() -> Float

    Return Value

    current morph weight (float)

  • Declaration

    Objective-C

    - (nullable BNBComponent *)asComponent;

    Swift

    func asComponent() -> BNBComponent?

    Return Value

    upcast to base type