RRAvatar3D

Objective-C

@interface RRAvatar3D : NSObject

Swift

class RRAvatar3D : NSObject

This class is a data container that stores all data that is related to a 3D avatar object

  • Default initializer

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Loading an avatar from file.

    Declaration

    Objective-C

    - (BOOL)loadFromFile:(nonnull NSString *)filePath
        largeObjectDataProvider:
            (RRAbstractLargeObjectDataProvider *_Nullable)largeObjectDataProvider
               didFailWithError:(NSError *_Nullable *_Nullable)error;

    Swift

    func load(fromFile filePath: String, largeObjectDataProvider: RRAbstractLargeObjectDataProvider?) throws

    Parameters

    filePath

    The file Path to the Avatar3D file.

    largeObjectDataProvider

    An RRAbstractLargeObjectDataProvider instance that provides the necessary body model data for loading the avatar.

    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.

  • Retrieves the bodymodel ID of the avatar’s visual representation

    Declaration

    Objective-C

    - (NSString *_Nullable)getVisualRepresentationBodyModelIDWithError:
        (NSError *_Nullable *_Nullable)error;

    Swift

    func getVisualRepresentationBodyModelID() throws -> String

    Parameters

    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

    The body model ID of the avatar’s visual representation. This method returns nil if an error occurs.

  • Prints the available bodymodel morphs of the avatar’s visual representation

    Declaration

    Objective-C

    - (BOOL)printVisualRepresentationBodyModelMorphsWithError:
        (NSError *_Nullable *_Nullable)error;

    Swift

    func printVisualRepresentationBodyModelMorphs() throws

    Parameters

    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.

  • Returns the RRBodyModel3DState of the avatar’s visual representation if available. nil otherwise

    Declaration

    Objective-C

    - (RRBodyModel3DState *_Nullable)getVisualRepresentationBodyModelState;

    Swift

    func getVisualRepresentationBodyModelState() -> RRBodyModel3DState?