MaxstARSDK  3.5.0
TrackingResult.cs
1 /*==============================================================================
2 Copyright 2017 Maxst, Inc. All Rights Reserved.
3 ==============================================================================*/
4 
5 using UnityEngine;
6 using System;
7 using System.Collections.Generic;
8 using System.Linq;
9 using System.Text;
10 using System.Runtime.InteropServices;
11 
12 namespace maxstAR
13 {
17  public class TrackingResult
18  {
19  private ulong cPtr;
20 
21  internal TrackingResult()
22  {
23  }
24 
25  internal void SetCPtr(ulong trackingResultCPtr)
26  {
27  this.cPtr = trackingResultCPtr;
28  }
29 
35  public int GetCount()
36  {
37  if (Application.platform == RuntimePlatform.IPhonePlayer)
38  {
39  return NativeStaticAPI.TrackingResult_getCount(cPtr);
40  }
41  else
42  {
43  return NativeSharedAPI.TrackingResult_getCount(cPtr);
44  }
45  }
46 
52  public Trackable GetTrackable(int index)
53  {
54  Trackable t;
55  if (Application.platform == RuntimePlatform.IPhonePlayer)
56  {
57  t = new Trackable(NativeStaticAPI.TrackingResult_getTrackable(cPtr, index));
58  }
59  else
60  {
61  t = new Trackable(NativeSharedAPI.TrackingResult_getTrackable(cPtr, index));
62  }
63 
64  return t;
65  }
66  }
67 }
Trackable GetTrackable(int index)
Get tracking target information
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: Trackable.cs:17