Beispiel #1
0
 /// input fiber is tested against all triangles of surface
 protected void pushCutter1(Fiber f)
 {
     nCalls = 0;
     foreach (Triangle t in surf.tris)
     {             // test against all triangles in s
         Interval i = new Interval();
         cutter.pushCutter(f, i, t);
         f.addInterval(i);
         ++nCalls;
     }
 }
Beispiel #2
0
        /// use kd-tree search to find overlapping triangles
        protected void pushCutter2(Fiber f)
        {
            LinkedList <Triangle> .Enumerator it;           // for looping over found triangles
            LinkedList <Triangle> .Enumerator it_end;
            Interval i;
            LinkedList <Triangle> tris;
            CLPoint cl = new CLPoint();

            if (x_direction)
            {
                cl.x = 0;
                cl.y = f.p1.y;
                cl.z = f.p1.z;
            }
            else if (y_direction)
            {
                cl.x = f.p1.x;
                cl.y = 0;
                cl.z = f.p1.z;
            }
            tris   = root.search_cutter_overlap(cutter, cl);
            it_end = tris.end();
            for (it = tris.GetEnumerator(); it != it_end; ++it)
            {
                i = new Interval();
//C++ TO C# CONVERTER TODO TASK: Iterators are only converted within the context of 'while' and 'for' loops:
                cutter.pushCutter(f, i, it.Current);
                f.addInterval(i);
                ++nCalls;
                if (i != null)
                {
                    i.Dispose();
                }
            }

            /*
             *          delete(tris);
             */
        }