Esempio n. 1
0
        public virtual void addCircle(float[] pos, float rad, float[] vel, float[] dvel)
        {
            if (m_ncircles >= m_maxCircles)
            {
                return;
            }

            ObstacleCircle cir = m_circles[m_ncircles++];

            DetourCommon.vCopy(cir.p, pos);
            cir.rad = rad;
            DetourCommon.vCopy(cir.vel, vel);
            DetourCommon.vCopy(cir.dvel, dvel);
        }
Esempio n. 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();
            }
        }