public void InitializeFromFileAscii(string sPath) { ActiveMode = StreamMode.MemoryStream; Frames = new List <ARKitFrame>(); currentFrame = null; read_ascii(sPath); }
public void BeginFrame(float timeSinceStartup, Vector3f camPos, Quaternionf camOrient) { currentFrame = new ARKitFrame(); currentFrame.realTime = timeSinceStartup; currentFrame.camPos = camPos; currentFrame.camOrientation = camOrient; if (ActiveMode == StreamMode.WriteToDiskStream) { disk_writer.WriteLine(to_string(currentFrame)); } else { currentFrame.SamplePoints = new List<ARKitPoint>(); currentFrame.AddedPlanes = new List<ARKitPlane>(); currentFrame.RemovedPlanes = new List<ARKitPlane>(); Frames.Add(currentFrame); } }
public void InitializeMemory() { ActiveMode = StreamMode.MemoryStream; Frames = new List <ARKitFrame>(); currentFrame = null; }
string to_string(ARKitFrame f) { return(string.Format("ff t {0} p {1} o {2}", f.realTime, f.camPos, f.camOrientation)); }