WTInstantTracker Class Reference
Inherits from | NSObject |
---|---|
Declared in | WTInstantTracker.h |
Overview
Instant trackers start in initializing state, during which the origin of the tracked scene can be set by rotating the device. Displaying a gravity aligned plane or target in the center of the screen can help users through this process. After this was set, the instant tracker can instantly transition to the tracking state, during which the actual tracking of the scene takes place.
delegate
The delegate object that is associated with this instant tracker object.
@property (nonatomic, weak) id<WTInstantTrackerDelegate> delegate
Discussion
The delegate object is usually set through the appropriate WTTrackerManager factory method.
Declared In
WTInstantTracker.h
– setActiveInstantTrackingState:
Changes the tracking state of the instant tracker
- (void)setActiveInstantTrackingState:(WTInstantTrackingState)state
Parameters
state |
The new state to which the instant tracker should switch to |
---|
Discussion
The tracking state is not changed immediately, and the didChangeState method can be used to get notified of exactly when that happens.
Declared In
WTInstantTracker.h
– setDeviceHeightAboveGround:
Allows changing the estimated height at which the device is currently above the ground.
- (void)setDeviceHeightAboveGround:(float)height
Parameters
height |
The estimated device height above the ground in meters |
---|
Discussion
Setting this to an appropriate value will allow the augmentations to have a scale close to the one they would have in reality.
Declared In
WTInstantTracker.h
– setTrackingPlaneOrientation:
Allows changing the orientation of the plane with which the instant tracking initializes
- (void)setTrackingPlaneOrientation:(float)trackingPlaneOrientation
Parameters
trackingPlaneOrientation |
The orientation of the tracking plane in degrees |
---|
Discussion
The orientation can only be changed if the active instant tracking state is WTInstantTrackerInitializing. It can be set to all values between 360 and -360. This can enable e.g. easier tracking on walls and ceilings.
Declared In
WTInstantTracker.h
– convertScreenCoordinate:toPointCloudCoordinateOnQueue:completion:
use this method to perform a hit test on the point cloud coming from the instant tracker.
When invoking this method, a block on the given operation queue is dispatched which performs the hit test operation. In case there is no point at the given screen coordinate, the BOOL property in the completion handler is set to NO. Otherwise the given 3d coordinate can be used to position an augmentation at this point.
- (void)convertScreenCoordinate:(CGPoint)screenCoordinate toPointCloudCoordinateOnQueue:(NSOperationQueue *)operationQueue completion:(WTInstantTrackingCoordinateConversionHandler)completionHandler
Parameters
screenCoordinate |
The screen coordinate for that a hit test should be performed |
---|---|
operationQueue |
The operation queue on which the hit test computation should be performed |
completionHandler |
The block that should be called when the hit test computation finishes |
Declared In
WTInstantTracker.h
– requestCurrentPointCloudOnQueue:representedThroughDataProvider:
use this method to get all points of the current point cloud that is managed by this instant tracker
When invoking this method, a block on the given operation queue is dispatched which performs the point cloud retrieval.
- (void)requestCurrentPointCloudOnQueue:(NSOperationQueue *)operationQueue representedThroughDataProvider:(WTInstantTrackingPointCloudDataProvider *)dataProvider
Parameters
operationQueue |
The operation queue on which the point cloud retrieval is performed |
---|---|
dataProvider |
The data provider that should be used to provide the current point cloud. |
Declared In
WTInstantTracker.h