Exemple #1
0
        public virtual void addSegment(float[] p, float[] q)
        {
            if (m_nsegments >= m_maxSegments)
            {
                return;
            }
            ObstacleSegment seg = m_segments[m_nsegments++];

            DetourCommon.vCopy(seg.p, p);
            DetourCommon.vCopy(seg.q, q);
        }
Exemple #2
0
        /// <summary>
        ///**************************** </summary>


        public ObstacleAvoidanceQuery(int maxCircles, int maxSegments)
        {
            m_maxCircles = maxCircles;
            m_ncircles   = 0;
            m_circles    = new ObstacleCircle[m_maxCircles];
            for (int i = 0; i < m_maxCircles; i++)
            {
                m_circles[i] = new ObstacleCircle();
            }
            m_maxSegments = maxSegments;
            m_nsegments   = 0;
            m_segments    = new ObstacleSegment[m_maxSegments];
            for (int i = 0; i < m_maxSegments; i++)
            {
                m_segments[i] = new ObstacleSegment();
            }
        }