MaxstARSDK  3.5.0
MasTrackingResult.mm
1 //
2 // MasTrackingResult.m
3 // MaxstAR
4 //
5 // Created by Kimseunglee on 2017. 12. 7..
6 // Copyright © 2017년 Maxst. All rights reserved.
7 //
8 
9 #import "MasTrackingResult.h"
10 #include "ITrackingResult.h"
11 #include "ITrackable.h"
12 
13 @interface MasTrackingResult()
14 {
15  maxstAR::ITrackingResult *_trackingResult;
16 }
17 
18 @end
19 
20 @implementation MasTrackingResult
21 
22 - (instancetype)init:(void*)trackingResult {
23  self = [super init];
24  if (self) {
25  _trackingResult = (maxstAR::ITrackingResult*)trackingResult;
26  }
27  return self;
28 }
29 
30 - (MasTrackable*) getTrackable:(int) index {
31  maxstAR::ITrackable *trackable = _trackingResult->getTrackable(index);
32 
33  if(trackable == nil) {
34  return nil;
35  }
36 
37  MasTrackable *masTrackable = [[MasTrackable alloc] init:trackable];
38  return masTrackable;
39 }
40 
41 - (int) getCount {
42  return _trackingResult->getCount();
43 }
44 
45 @end
int getCount()
Get tracking target count. Current version ar engine could not track multi target. That feature will be implemented not so far future.
Contains tracked targets informations.
Container for individual tracking information.
Definition: MasTrackable.h:15