BNBRendererCommon

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

  • return rgba image, srcImage can be rgb or rgba

    Declaration

    Objective-C

    + (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;

    Swift

    class func morphMesh(_ srcImage: BNBFullImageData, originalVerts: [NSNumber], morphedVerts: [NSNumber], indices: [NSNumber], mvp: [NSNumber]) -> BNBFullImageData
  • return rgba image, srcImage can be rgb or rgba

    Declaration

    Objective-C

    + (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;

    Swift

    class func morphMeshLandmarks(_ srcImage: BNBFullImageData, srcLandmarks: [NSNumber], originalVerts: [NSNumber], morphedVerts: [NSNumber], indices: [NSNumber], mvp: [NSNumber]) -> BNBBnbMorphResult