#import <CraftARTrackingContent.h>

Instance Methods |
|
(id) | - initWithSceneDescriptionItem:andContentVersion:withError: |
(CraftARTrackingContetnStatus) | - getStatus |
(void) | - trackingStarted |
(void) | - trackingLost |
(void) | - contentTouchDown |
(void) | - contentTouchUp |
(void) | - contentTouchIn |
(void) | - contentTouchOut |
Properties |
|
id < CraftARTrackingContentLoadCallbacks > |
delegate |
Delegate for receiving content load callbacks (currently only works for 3D models) | |
BOOL | parentARItemIsTracking |
NSString * | contentId |
Free variable. You can use it using the key 'id' when creating contents with the management API to identify your contents. | |
NSString * | uuid |
Unique identifier of the content in CraftAR. | |
NSString * | hyperlinkUrl |
Content's hyperlink url. | |
CATransform3D | translation |
Content's translation relative to reference's center. More... | |
CATransform3D | rotation |
Content's rotation relative to reference's center. More... | |
CATransform3D | scale |
Content's scale relative to reference's width. More... | |
CraftARTrackingContentWrapMode | wrapMode |
Defines how flat contents are drawn over the reference. More... | |
float | alpha |
Draw the content with _alpha transparency. | |
int | contentVersion |
CraftARItemAR * | parentItemAR |
AR item to which this contnent was added. | |
Detailed Description
The CraftARTrackingContent class is an abstract class with the basic information for an AR content and methods to render the contents. Basic implementations of contents are provided. This class or its subclasses can be extended to create new contents or modify their behaviour.
Contents can be created manually or parsed from an item's scene description from a CloudRecognitionItem object.
Method Documentation
- (void) contentTouchDown |
Called by the SDK when the user touches down the drawn content
- Note
- When extending a content, call super if you override this method.
- (void) contentTouchIn |
Called by the SDK when the user moves in the drawn content
- Note
- When extending a content, call super if you override this method.
- (void) contentTouchOut |
Called by the SDK when the user moves out the drawn content
- Note
- When extending a content, call super if you override this method.
- (void) contentTouchUp |
Called by the SDK when the user touches down the drawn content
- Note
- When extending a content, call super if you override this method.
- (CraftARTrackingContetnStatus) getStatus |
Get the content's status
- (id) initWithSceneDescriptionItem: | (NSDictionary *) | sceneDescription | |
andContentVersion: | (int) | version | |
withError: | (NSError **) | error | |
Initializes the content object with a scene description item
- Parameters
-
sceneDescription Description of a specific content from the CraftAR content JSON spec. error Error if the Content could not be created.
- (void) trackingLost |
Called by the SDK when the tracking is lost for this reference's content.
- Note
- When extending a content, call super if you override this method.
Implemented in CraftARTrackingContentVideo.
- (void) trackingStarted |
Called by the SDK when the reference for this content starts being tracked.
- Note
- When extending a content, call super if you override this method.
Implemented in CraftARTrackingContentVideo.
Property Documentation
|
readwritenonatomicassign |
Content's rotation relative to reference's center.
X axis goes from the center of the reference image to its right
Y axis goes from the center of the reference image to its top
Z axis goes up from the center of the reference image
- Note
- rotation is identity by default (no rotation)
|
readwritenonatomicassign |
Content's scale relative to reference's width.
When scale is 1 in all axis, the content's width will match the reference's widht. Aspect ratio will be kept.
- Note
- scale is 1 by default
|
readwritenonatomicassign |
Content's translation relative to reference's center.
Translation dimensions are relative to reference's width.
1 unit translation in 'x' means the reference will be moved 1 referece's width times to the right of the center of the reference.
1 unit translation in 'y' means the reference will be moved 1 referece's width times to the top of the reference.
1 unit translation in 'z' means the reference will be moved 1 referece's width times to the over the reference.
- Note
- translation is identity by default (no translation)
|
readwritenonatomicassign |
Defines how flat contents are drawn over the reference.
There are 4 wrap modes:
- NONE: The content will be drawn using _scale dimensions.
- SCALE_FILL: The content will be scaled to fill the reference's dimensions (aspect ratio won't be kept, _scale will be ignored)
- ASPECT_FILL: The content will be scaled to fill cover the reference while keeping aspect ratio (_scale ignored)
- ASPECT_FIT: The content will be scaled to fit the reference's edges while keeping aspect ratio (_scale ignored)
The documentation for this class was generated from the following file:
- CraftARProSDK.framework/Headers/CraftARTrackingContent.h