/// <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();
        }
示例#3
0
        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();
        }
示例#6
0
        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);
        }
示例#7
0
        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);
        }
示例#8
0
        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);
        }
示例#9
0
 public IPointCloudBinarySourceEnumerator GetBlockEnumerator(ProgressManagerProcess process)
 {
     return new PointCloudBinarySourceCompositeEnumerator(m_files, process);
 }
示例#10
0
 public void Add(ProgressManagerProcess process)
 {
     m_children.Add(process);
 }
示例#11
0
        public void EndProcess(ProgressManagerProcess process)
        {
            m_currentProcess = process.Parent;

            UpdateStatus();
        }
示例#12
0
        public ProgressManagerProcess StartProcess(string name)
        {
            var process = new ProgressManagerProcess(m_progressManager, this, name);

            return(process);
        }
示例#13
0
 public PointCloudTileSourceEnumerator GetTileEnumerator(ProgressManagerProcess process)
 {
     return new PointCloudTileSourceEnumerator(this, process);
 }
示例#14
0
文件: LASFile.cs 项目: jdauie/cloudae
 public IPointCloudBinarySourceEnumerator GetBlockEnumerator(ProgressManagerProcess process)
 {
     return new PointCloudBinarySourceEnumerator(this, process);
 }
示例#15
0
 public void Add(ProgressManagerProcess process)
 {
     m_children.Add(process);
 }
示例#16
0
        public void EndProcess(ProgressManagerProcess process)
        {
            m_currentProcess = process.Parent;

            UpdateStatus();
        }
示例#17
0
 public ProgressManagerProcess StartProcess(string name)
 {
     var process = new ProgressManagerProcess(m_progressManager, this, name);
     return process;
 }