MatOfPoint3f

Objective-C

@interface MatOfPoint3f : Mat

Swift

class MatOfPoint3f : Mat

Mat representation of an array of Point3f objects

Constructors

  • Create MatOfPoint3f from Mat object

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMat:(nonnull Mat *)mat;

    Swift

    init(mat: Mat)

    Parameters

    mat

    Mat object from which to create MatOfPoint3f

  • Create MatOfPoint3f from array

    Declaration

    Objective-C

    - (nonnull instancetype)initWithArray:(nonnull NSArray<Point3f *> *)array;

    Swift

    init(array: [Point3f])

    Parameters

    array

    Array from which to create MatOfPoint3f

Methods

  • Allocate specified number of elements

    Declaration

    Objective-C

    - (void)alloc:(int)elemNumber;

    Swift

    func alloc(_ elemNumber: Int32)

    Parameters

    elemNumber

    Number of elements

  • Populate Mat with elements of an array

    Declaration

    Objective-C

    - (void)fromArray:(nonnull NSArray<Point3f *> *)array;

    Swift

    func fromArray(_ array: [Point3f])

    Parameters

    array

    Array with which to populate the Mat

  • Output Mat elements as an array of Point3f objects

    Declaration

    Objective-C

    - (nonnull NSArray<Point3f *> *)toArray;

    Swift

    func toArray() -> [Point3f]
  • Total number of values in Mat

    Declaration

    Objective-C

    - (int)length;

    Swift

    func length() -> Int32