RRPLYLoader

Objective-C

@interface RRPLYLoader : NSObject

Swift

class RRPLYLoader : NSObject

A loader class for 3d meshes based on the PLY file format

See

RRMesh3D
  • Default initializer

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Load PLY file from file data

    Declaration

    Objective-C

    - (BOOL)fromData:(nonnull NSData *)data
        didFailWithError:(NSError *_Nullable *_Nullable)error;

    Swift

    func fromData(_ data: Data) throws

    Parameters

    data

    An NSData instance containing the file data of an PLY file

    error

    An optional pointer to an NSError pointer. When this method fails, it will set an NSError instance to this pointer if provided.

    Return Value

    YES if successful, NO otherwise.

  • Load PLY file from file

    Declaration

    Objective-C

    - (BOOL)fromFile:(nonnull NSString *)filePath
        didFailWithError:(NSError *_Nullable *_Nullable)error;

    Swift

    func fromFile(_ filePath: String) throws

    Parameters

    filePath

    The file path of an PLY file

    error

    An optional pointer to an NSError pointer. When this method fails, it will set an NSError instance to this pointer if provided.

    Return Value

    YES if successful, NO otherwise.

  • Create an RRMesh3D instance based on the loaded PLY data

    See

    RRMesh3D

    Declaration

    Objective-C

    - (nonnull RRMesh3D *)toMesh3D;

    Swift

    func toMesh3D() -> Any!

    Return Value

    The loaded RRMesh3D instance