예제 #1
0
        /// <summary>
        /// Create a strip result for 2 Scanline (with same Nbr of Points)
        /// </summary>
        /// <param name="prev"></param>
        /// <param name="current"></param>
        public StripResult(ScanLine prev, ScanLine current)
        {
            if (prev.Count != current.Count)
            {
                throw new Exception(" previous and current pointlist doesn't have the same point count");
            }
            Previous = prev;
            Current  = current;
            Result   = new ScanSlice(Previous.Count + current.Count);
            //GL.Begin(PrimitiveType.LineStrip);
            int count = Math.Min(Previous.Count, current.Count);

            for (int i = 0; i < count; i++)
            {
                Result.Add(Previous[i]);
                Result.Add(current[i]);
            }
            AbstractMeshBuilder.AdjustNormalFromTriangleStrip(Result);
        }
예제 #2
0
        /// <summary>
        /// Clone the task
        /// </summary>
        /// <returns></returns>
        public override AbstractProcessingTask Clone()
        {
            AbstractMeshBuilder ret = (AbstractMeshBuilder)Activator.CreateInstance(this.GetType());

            return(ret);
        }