/// <summary> /// Enable the spatial mapping /// </summary> /// <param name="resolutionPreset"> A preset resolution</param> /// <param name="rangePreset">A preset range</param> /// <param name="isTextured">if true, images will be collected during the process</param> /// <returns></returns> private sl.ERROR_CODE EnableSpatialMapping(RESOLUTION resolutionPreset, RANGE rangePreset, bool isTextured) { sl.ERROR_CODE error; this.isTextured = isTextured; error = zedSpatialMapping.EnableSpatialMapping(ZEDSpatialMappingHelper.ConvertResolutionPreset(resolutionPreset), ZEDSpatialMappingHelper.ConvertRangePreset(rangePreset), isTextured); ZEDMeshRenderer.isTextured = false; stopWanted = false; running = true; if (error == sl.ERROR_CODE.SUCCESS) { display = true; meshUpdated = false; spatialMappingRequested = false; updateTexture = false; updatedTexture = false; // clear all prevous meshes ClearMeshes(); //start the requesting meshes zedCamera.RequestMesh(); //Launch the thread to retrieve the chunks and their sizes scanningThread = new Thread(UpdateMesh); updateThreadRunning = true; if (OnMeshStarted != null) { OnMeshStarted(); } scanningThread.Start(); } return(error); }
private void InitPresenceTab() { btnViewRange.Text = "Monthly view"; m_ViewRange = RANGE.WEEK; btnPreviousRange.Text = "Previous week"; btnNextRange.Text = "Next week"; m_CurrentMonth = DateTime.Today.Month; GetPrograms(); gbPresence.Visible = false; }
public MainForm() { InitializeComponent(); m_DatesWeekFormat = new string[7]; m_DatesMonthFormat = new string[31]; m_ViewRange = RANGE.WEEK; m_CurrentMonth = DateTime.Today.Month; this.CenterToScreen(); }
/// <summary> /// Starts the spatial mapping /// </summary> /// <param name="resolutionPreset"></param> /// <param name="rangePreset"></param> /// <param name="isTextured"></param> public void StartStatialMapping(RESOLUTION resolutionPreset, RANGE rangePreset, bool isTextured) { holder.transform.position = Vector3.zero; holder.transform.rotation = Quaternion.identity; spatialMappingRequested = true; if (spatialMappingRequested && scanningInitState != sl.ERROR_CODE.SUCCESS) { scanningInitState = EnableSpatialMapping(resolutionPreset, rangePreset, isTextured); } zedManager.gravityRotation = Quaternion.identity; }
public void Add(RANGE range) { int n = this.ranges.Length; int i = this.length++; if (i == n) { RANGE[] new_ranges = new RANGE[n + 8]; for (int j = 0; j < n; j++) { new_ranges[j] = ranges[j]; } this.ranges = new_ranges; } this.ranges[i] = range; }
/// <summary> /// Updates the range and resolution to match the specified preset. /// </summary> static public float ConvertRangePreset(RANGE rangePreset) { if (rangePreset == RANGE.NEAR) { return(3.5f); } else if (rangePreset == RANGE.MEDIUM) { return(5.0f); } if (rangePreset == RANGE.FAR) { return(10.0f); } return(5.0f); }
private void btnViewRange_Click(object sender, EventArgs e) { if (m_ViewRange.Equals(RANGE.WEEK)) { btnViewRange.Text = "Weekly view"; m_ViewRange = RANGE.MONTH; btnPreviousRange.Text = "Previous month"; btnNextRange.Text = "Next month"; UpdatePresenceGridInformationMonthFormat(); } else if (m_ViewRange.Equals(RANGE.MONTH)) { btnViewRange.Text = "Monthly view"; m_ViewRange = RANGE.WEEK; btnPreviousRange.Text = "Previous week"; btnNextRange.Text = "Next week"; UpdatePresenceGridInformationWeekFormat(); } }
protected override void Visit_RANGE(RANGE node) { /* MOVE CODE HERE */ }
public DISTATE(ulong start, RANGE mr) { pc = start; memrange = mr; }
public RANGE memrange; /* memory range */ public DIS(ulong _pc, RANGE _mr) { flags = 0; pc = _pc; data[0] = data[1] = data[2] = 0xDEAD; n = 0; w = 0; c = 0; i = Reg.NOREG; j = Reg.NOREG; x = 0; opnds = null; comment = null; memrange = _mr; }
public void Add(RANGE r) { list.Add(r); }
static ulong dis(ulong start, ulong end, RANGE drp, RANGE mrp) { DisFun disfn; if ((start & 1) != 0) { Error("Odd start address 0x{0:x8}", start); start &= 0xffFFffFFffFFffFe; } if ((end & 1) != 0) { end++; } switch (mrp.data.mem) { default: case MemType.MEMTYPE_NONE: return end + 1; case MemType.MEMTYPE_UNKNOWN: case MemType.MEMTYPE_CODE: disfn = discode; break; case MemType.MEMTYPE_DATA: disfn = disdata; break; } if (seekto(start)) { Debug.WriteLine("Seek failed"); return end + 1; } DISTATE state = new DISTATE(start, mrp); while (state.pc < end) { int n; if ((n = disfn(state)) < 0) { if (n != -1) Error("input error: {0}", (-n - 1)); drp.end = state.pc; state.pc = 0xFFffFFffFFffFFff; break; } state.pc += (uint)n; } return state.pc; }
protected virtual void Visit_RANGE(RANGE node) { }
static bool options(params string[] args) { parseopt pos = new parseopt(args); ulong start, end; DATA map; int opt; string r; string arg; while ((opt = pos.next()) >= 0) { switch (opt) { case 0: if (opt_infile != "") { Log("{0}: too many input files", cmdname); usage(); return(false); } opt_infile = pos.arg(); break; case 'D': case 'd': arg = pos.arg(); if (arg == null || arg == "") { goto missing; } if (parserange(opt, arg, out r, out start, out end)) { break; } rangemap.Add(new RANGE(start, end, 1)); break; case 'E': case 'e': // if (!(arg = parseopt_arg(&pos))) // goto missing; // fprintf(stderr, "%s: symbol table not implemented yet!\n"); return(false); case 'F': case 'f': // if (!(arg = parseopt_arg(&pos))) // goto missing; // if (parsemap(opt, arg, &r, &start, &end, &map)) // break; // insmap(&filemap, map, map + end - start, start); break; case 'H': case 'h': case '?': usage(); return(false); case 'I': case 'i': arg = pos.arg(); if (arg == null || arg == "") { goto missing; } RANGE range = parsemap(opt, arg, out r); if (range == null) { break; } filemap.Add(range); break; case 'L': case 'l': opt_little = true; break; case 'M': case 'm': arg = pos.arg(); if (arg == null || parserange(opt, arg, out r, out start, out end)) { showhelp(memtypehelp); return(false); } if (parsememtype(r.Substring(1), out map)) { return(false); } memmap.Add(new RANGE(start, end, map)); break; case 'O': case 'o': opt_outfile = pos.arg(); if (opt_outfile == null || opt_outfile == "") { goto missing; } break; case 'R': case 'r': opt_split = true; break; case 'S': case 's': // if (!(arg = parseopt_arg(&pos))) // goto missing; // fprintf(stderr, "%s: symbol table not implemented yet!\n"); // exit(1); break; case 'T': case 't': // if (!(arg = parseopt_arg(&pos))) // goto missing; // start = parseul(arg, &r); // insmap(&memmap, start, start + 0x3FF, MKDATA(1, MD_VECTOR)); break; case 'V': case 'v': opt_outflag |= OutOpt.OF_VERBOSE; break; case 'W': case 'w': // if (!(arg = parseopt_arg(&pos))) // goto missing; // if (parseflags(opt, arg, &opt_outflag, outflags)) // exit(1); break; case 'X': case 'x': arg = pos.arg(); if (arg == null || fileoptions(arg) == false) { Log("{0}: cannot open options file \"{1}\"", cmdname, arg); usage(); return(false); } break; case 'Z': case 'z': opt_outflag |= OutOpt.OF_DEBUG; break; default: Log("{0}: unknown option \"-{1}\"", cmdname, opt); usage(); return(false); } } pos.end(); return(true); missing: Log("{0}: option \"-{1}\" requires an argument", cmdname, opt); return(false); }