7 using System.Collections.Generic;
10 using System.Runtime.InteropServices;
19 private const int MAX_VERTICES = 2000;
21 private float progress = 0.0f;
22 private int keyframeCount = 0;
23 private int featureCount = 0;
24 private static float[] featureBuffer = null;
31 internal void UpdateGuideInfo()
33 if (Application.platform == RuntimePlatform.IPhonePlayer)
36 if (GuideInfo_cPtr != 0)
38 progress =
NativeStaticAPI.GuideInfo_getInitializingProgress(GuideInfo_cPtr);
39 keyframeCount =
NativeStaticAPI.GuideInfo_getKeyframeCount(GuideInfo_cPtr);
40 featureCount =
NativeStaticAPI.GuideInfo_getFeatureCount(GuideInfo_cPtr);
42 if (featureBuffer == null)
44 featureBuffer =
new float[MAX_VERTICES * 3];
47 NativeStaticAPI.GuideInfo_getFeatureBuffer(GuideInfo_cPtr, featureBuffer, featureCount * 3);
53 if (GuideInfo_cPtr != 0)
55 progress =
NativeSharedAPI.GuideInfo_getInitializingProgress(GuideInfo_cPtr);
56 keyframeCount =
NativeSharedAPI.GuideInfo_getKeyframeCount(GuideInfo_cPtr);
57 featureCount =
NativeSharedAPI.GuideInfo_getFeatureCount(GuideInfo_cPtr);
59 if (featureBuffer == null)
61 featureBuffer =
new float[MAX_VERTICES * 3];
64 NativeSharedAPI.GuideInfo_getFeatureBuffer(GuideInfo_cPtr, featureBuffer, featureCount * 3);
102 return featureBuffer;
float [] GetFeatureBuffer()
Get projected feature buffer for SLAM (Always returns same address so vertex count must be considered...
int GetFeatureCount()
Get projected feature count in SLAM (float * 3 = 1 feature)
Contains surface's data generated from slam tracking
float GetInitializingProgress()
Get a percentage of progress during an initialization step of SLAM
int GetKeyframeCount()
Get keyframe count in SLAM