Example #1
0
        Triangle LocateInternal(Triangle startTriangle, DelaunayPoint end)
        {
            int step = 0;

            //first check if the point is in the current Triangle_t
            while ((startTriangle != null) && !startTriangle.Contains(end, ref startTriangle) && (++step) <= NUM_STEPS_TO_LOCATE)
            {
            }

            if (step > NUM_STEPS_TO_LOCATE)
            {
                startTriangle = null;
            }

            if (startTriangle == null)
            {
                return(null);
            }

            m_currentTriangle = startTriangle;
            return(m_currentTriangle);
        }
Example #2
0
        Triangle LocateInternal(Triangle startTriangle, DelaunayPoint end)
        {
            int step = 0;

            //first check if the point is in the current Triangle_t
            while((startTriangle != null) && !startTriangle.Contains(end, ref startTriangle) && (++step) <= NUM_STEPS_TO_LOCATE)
            {
            }

            if(step > NUM_STEPS_TO_LOCATE)
                startTriangle = null;

            if(startTriangle == null)
                return null;

            m_currentTriangle = startTriangle;
            return m_currentTriangle;
        }