KudanAR - iOS  1.6.0
ARModelImporter Class Reference

#import <ARModelImporter.h>

Inherits NSObject.

Instance Methods

(instancetype) - initWithPath:
 
(instancetype) - initWithBundled:
 
(ARModelNode *) - getNode
 

Properties

NSMutableArray * meshNodes
 

Detailed Description

The ARModelImporter Class imports 3D models from the binary format. Models must be in the .armodel format. .fbx, .obj and .dae model files can be converted to .armodel via the Kudan AR Toolkit, available at https://www.kudan.eu/download-kudan-ar-sdk/.

Method Documentation

◆ getNode

- (ARModelNode *) getNode

Gets the node representing the model imported from the .armodel file. If all textures from the model are included in the main bundle, they will automatically be applied to the model's meshes.

Example of use:

ARModelImporter *modelImporter = [[ARModelImporter alloc] initWithBundled:@"example.armodel"];
ARModelNode *modelNode = [modelImporter getNode];
Returns
The a Node representing the imported model.

◆ initWithBundled:

- (instancetype) initWithBundled: (NSString *)  file

Initialises the importer with a .armodel file located in the app bundle. The file path is relative to the app bundle.

Example of use:

ARModelImporter *modelImporter = [[ARModelImporter alloc] initWithBundled:@"example.armodel"];
Parameters
pathThe filename relative to the app's main bundle, including file extension.
Returns
The initialised model importer.

◆ initWithPath:

- (instancetype) initWithPath: (NSString *)  path

Initialises the importer with a full path name pointing to a .armodel file. The file path is absolute.

Example of use:

NSString *filePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"example.armodel"];
ARModelImporter *modelImporter = [[ARModelImporter alloc] initWithPath:filePath];
Parameters
pathThe full pathname of the model file's location, including file extension.
Returns
The initialised model importer.

Property Documentation

◆ meshNodes

- (NSMutableArray*) meshNodes
readwriteatomicassign

The complete array of all ARMeshNodes imported from the model file.


The documentation for this class was generated from the following files:
ARModelImporter
Definition: ARModelImporter.h:10
ARModelNode
Definition: ARModelNode.mm:33
-[ARModelImporter getNode]
ARModelNode * getNode()
Definition: ARModelImporter.mm:412