public static void ChangeDepth(GameObject go, int startDepth) { DepthSaver saver = new DepthSaver(); saver.Save(go); saver.Load(startDepth, false); }
//TODO configure which ones you want to have in save queue public SaveQueue(string path, CoordinateMapper mapper, bool saveColor, bool saveDepth, bool saveIndex, bool saveTracked) { SaveColor = saveColor; SaveDepth = saveDepth; SaveIndex = saveIndex; SaveTracked = saveTracked; if (!String.IsNullOrEmpty(path)) { BasePath = path; } if (!Directory.Exists(BasePath)) { Directory.CreateDirectory(BasePath); } CurrentPath = Path.Combine(BasePath, DateTime.Now.ToString().Replace(':', '_').Replace('/', '_')); Directory.CreateDirectory(CurrentPath); if (SaveColor || SaveTracked) { if (SaveColor) { color = new ColorSaver(CurrentPath); } colorPool = new ArrayPool <byte>(Recorder.COLOR_SIZE, COLOR_POOL_SIZE); } if (SaveDepth || SaveTracked) { if (SaveDepth) { depth = new DepthSaver(CurrentPath); } depthPool = new ArrayPool <ushort>(Recorder.DEPTH_LENGTH, DEPTH_POOL_SIZE); } if (SaveIndex) { index = new IndexSaver(CurrentPath); indexPool = new ArrayPool <byte>(Recorder.INDEX_LENGTH, INDEX_POOL_SIZE); } if (SaveTracked) { tracked = new TrackedColorSaver(CurrentPath, mapper); } }
public static void ChangeDepth(Transform t, int startDepth) { DepthSaver.ChangeDepth(t.gameObject, startDepth); }
public static void ChangeDepth(MonoBehaviour mo, int startDepth) { DepthSaver.ChangeDepth(mo.gameObject, startDepth); }