KudanAR - iOS  1.6.0
ARMultiTrackableNode Class Reference

#import <ARMultiTrackableNode.h>

Inherits ARNode.

Instance Methods

(void) - addTrackable:
 
(void) - removeTrackable:
 
- Instance Methods inherited from ARNode
(void) - addChild:
 
(void) - addChildren:
 
(void) - removeChild:
 
(void) - removeAllChildren
 
(void) - remove
 
(ARNode *) - findChildWithName:
 
(void) - markWorldTransformAsDirty
 
(void) - translateByX:y:z:
 
(void) - translateByX:y:z:transformSpace:
 
(void) - translateByVector:
 
(void) - translateByVector:transformSpace:
 
(void) - scaleByUniform:
 
(void) - scaleByX:y:z:
 
(void) - scaleByVector:
 
(void) - rotateByDegrees:axisX:y:z:
 
(void) - rotateByRadians:axisX:y:z:
 
(void) - rotateByQuaternion:
 
(ARVector3 *) - positionToWorld:
 
(ARVector3 *) - positionToEye:
 
(ARQuaternion *) - orientationToWorld:
 
(ARQuaternion *) - orientationToEye:
 
(CGPoint) - viewPortFromNodePosition:
 
(void) - render
 
(void) - preRender
 
(void) - postRender
 
(void) - addTouchTarget:withAction:
 
(void) - didReceiveTouch
 
(ARVector3 *) - nodeFromViewPort:
 

Properties

NSArray * trackables
 
- Properties inherited from ARNode
NSString * name
 
ARNodeparent
 
NSArray< ARNode * > * children
 
NSArray * descendants
 
ARVector3position
 
ARVector3scale
 
ARQuaternionorientation
 
ARMatrix4localTransform
 
ARMatrix4worldTransform
 
ARMatrix4fullTransform
 
ARQuaternionfullOrientation
 
ARQuaternionworldOrientation
 
ARVector3worldScale
 
ARVector3worldPosition
 
ARVector3fullPosition
 
ARNodeworld
 
NSUInteger childCount
 
BOOL visible
 

Additional Inherited Members

- Class Methods inherited from ARNode
(instancetype) + nodeWithName:
 
- Protected Types inherited from ARNode
enum  TransformSpace { ARNodeTransformSpaceLocal, ARNodeTransformSpaceParent, ARNodeTransformSpaceWorld }
 

Detailed Description

An ARMultiTrackableNode is a type of ARNode that dynamically changes which world it is a child of. This allows a single node to be displayed across different worlds at different times.

It is useful when one piece of content needs to be displayed across numerous trackables, as that content can be reused, and does not need to be created more than once.

An ARMultiTrackableNode cannot be used to display content on multiple trackables at the same time. When a trackable is detected, this node changes its world. That means that detecting two trackables will simply make it change its world to the one that was detected last.

Method Documentation

◆ addTrackable:

- (void) addTrackable: (ARImageTrackable *)  trackable

Adds a trackable to the array of trackables that this node will attach itself to when detected. This method adds one trackable at a time.

Example of use:

ARImageTrackable *trackable1 = [[ARImageTrackable alloc] initWithBundledFile:@"example1.jpg"];
ARImageTrackable *trackable2 = [[ARImageTrackable alloc] initWithBundledFile:@"example2.jpg"];
ARMultiTrackableNode *multiNode = [[ARMultiTrackableNode alloc] init];
[multiNode addTrackable:trackable1];
[multiNode addTrackable:trackable2];
Parameters
trackableThe trackable to add.

◆ removeTrackable:

- (void) removeTrackable: (ARImageTrackable *)  trackable

Removes a trackable from the array of trackables and no longer reparents itself to it once detected. This method removes one trackable at a time.

Example of use:

[multiNode removeTrackable:trackable2];
Parameters
trackableThe trackable to remove.

Property Documentation

◆ trackables

- (NSArray *) trackables
readwritenonatomicassign

The array of all trackables this node follows.


The documentation for this class was generated from the following files:
ARImageTrackable
Definition: ARImageTrackable.h:12
ARMultiTrackableNode
Definition: ARMultiTrackableNode.h:15