/// <summary> /// Initializes a new instance of the <see cref="PointCloudBinarySourceCompositeEnumerator"/> class. /// This version does not use a process, so that it can be managed by a composite. /// </summary> /// <param name="sources">The sources.</param> /// <param name="buffer">The buffer.</param> public PointCloudBinarySourceCompositeEnumerator(IEnumerable<IPointCloudBinarySourceEnumerable> sources, BufferInstance buffer) { m_sources = sources.ToArray(); m_process = null; m_buffer = buffer; m_points = m_sources.Sum(s => s.Count); Reset(); }
public PointCloudBinarySourceCompositeEnumerator(IEnumerable<IPointCloudBinarySourceEnumerable> sources, ProgressManagerProcess process) { m_sources = sources.ToArray(); m_process = process; m_buffer = m_process.AcquireBuffer(true); m_points = m_sources.Sum(s => s.Count); Reset(); }
public ProgressManagerProcess StartProcess(string name) { if (m_currentProcess != null) m_currentProcess = m_currentProcess.StartProcess(name); else m_currentProcess = new ProgressManagerProcess(this, null, name); UpdateStatus(); return m_currentProcess; }
/// <summary> /// Initializes a new instance of the <see cref="PointCloudBinarySourceEnumerator"/> class. /// This version does not use a process, so that it can be managed by a composite. /// </summary> /// <param name="source">The source.</param> /// <param name="buffer">The buffer.</param> public PointCloudBinarySourceEnumerator(IPointCloudBinarySourceSequentialEnumerable source, BufferInstance buffer) { m_source = source; m_stream = m_source.GetStreamReader(); m_buffer = buffer; m_process = null; m_endPosition = m_source.PointDataOffset + m_source.Count * m_source.PointSizeBytes; m_usableBytesPerBuffer = (m_buffer.Length / m_source.PointSizeBytes) * m_source.PointSizeBytes; Reset(); }
public PointCloudBinarySourceEnumerator(IPointCloudBinarySourceSequentialEnumerable source, ProgressManagerProcess process) { m_source = source; m_stream = m_source.GetStreamReader(); m_buffer = process.AcquireBuffer(true); m_process = process; m_endPosition = m_source.PointDataOffset + m_source.Count * m_source.PointSizeBytes; m_usableBytesPerBuffer = (m_buffer.Length / m_source.PointSizeBytes) * m_source.PointSizeBytes; Reset(); }
public ProgressManagerProcess StartProcess(string name) { if (m_currentProcess != null) { m_currentProcess = m_currentProcess.StartProcess(name); } else { m_currentProcess = new ProgressManagerProcess(this, null, name); } UpdateStatus(); return(m_currentProcess); }
public ProgressManagerProcess(ProgressManager progressManager, ProgressManagerProcess parent, string name) { m_progressManager = progressManager; m_id = IdentityManager.AcquireIdentity(name, IdentityType.Process); m_stopwatch = new Stopwatch(); m_parent = parent; m_children = new List<ProgressManagerProcess>(); m_progressManager.Update(0.0f); m_stopwatch.Start(); int i = 0; ProgressManagerProcess proc = this; while ((proc = proc.Parent) != null) i++; //Context.WriteLine(string.Format("{0}{1} -> Start", string.Empty.PadRight(2 * i), m_id)); //Context.WriteLine("{0}{1} {2}", string.Empty.PadRight(2 * i), m_id, "{"); ContextManager.WriteLine("{0}{1}", string.Empty.PadRight(2 * i), m_id); }
public ProgressManagerProcess(ProgressManager progressManager, ProgressManagerProcess parent, string name) { m_progressManager = progressManager; m_id = IdentityManager.AcquireIdentity(name, IdentityType.Process); m_stopwatch = new Stopwatch(); m_parent = parent; m_children = new List <ProgressManagerProcess>(); m_progressManager.Update(0.0f); m_stopwatch.Start(); int i = 0; ProgressManagerProcess proc = this; while ((proc = proc.Parent) != null) { i++; } //Context.WriteLine(string.Format("{0}{1} -> Start", string.Empty.PadRight(2 * i), m_id)); //Context.WriteLine("{0}{1} {2}", string.Empty.PadRight(2 * i), m_id, "{"); ContextManager.WriteLine("{0}{1}", string.Empty.PadRight(2 * i), m_id); }
public IPointCloudBinarySourceEnumerator GetBlockEnumerator(ProgressManagerProcess process) { return new PointCloudBinarySourceCompositeEnumerator(m_files, process); }
public void Add(ProgressManagerProcess process) { m_children.Add(process); }
public void EndProcess(ProgressManagerProcess process) { m_currentProcess = process.Parent; UpdateStatus(); }
public ProgressManagerProcess StartProcess(string name) { var process = new ProgressManagerProcess(m_progressManager, this, name); return(process); }
public PointCloudTileSourceEnumerator GetTileEnumerator(ProgressManagerProcess process) { return new PointCloudTileSourceEnumerator(this, process); }
public IPointCloudBinarySourceEnumerator GetBlockEnumerator(ProgressManagerProcess process) { return new PointCloudBinarySourceEnumerator(this, process); }
public ProgressManagerProcess StartProcess(string name) { var process = new ProgressManagerProcess(m_progressManager, this, name); return process; }