MatOfPoint3

Objective-C

@interface MatOfPoint3 : Mat

Swift

class MatOfPoint3 : Mat

Mat representation of an array of Point3i objects

Constructors

  • Create MatOfPoint3 from Mat object

    Declaration

    Objective-C

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

    Swift

    init(mat: Mat)

    Parameters

    mat

    Mat object from which to create MatOfPoint3

  • Create MatOfPoint3 from array

    Declaration

    Objective-C

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

    Swift

    init(array: [Point3i])

    Parameters

    array

    Array from which to create MatOfPoint3

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<Point3i *> *)array;

    Swift

    func fromArray(_ array: [Point3i])

    Parameters

    array

    Array with which to populate the Mat

  • Output Mat elements as an array of Point3i objects

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    - (int)length;

    Swift

    func length() -> Int32