A dynamic tree arranges data in a binary tree to accelerate queries such as volume queries and ray casts. Leafs are proxies with an AABB. In the tree we expand the proxy AABB by _fatAABBFactor so that the proxy AABB is bigger than the client object. This allows the client object to move by small amounts without triggering a tree update.
Пример #1
0
        public BroadPhase()
        {
            ProxyCount = 0;

            m_pairCapacity = 16;
            m_pairCount = 0;
            m_pairBuffer = new Pair[m_pairCapacity];
            for (int i = 0; i < m_pairCapacity; i++)
            {
                m_pairBuffer[i] = new Pair();
            }

            m_moveCapacity = 16;
            m_moveCount = 0;
            m_moveBuffer = new int[m_moveCapacity];

            m_tree = new DynamicTree();
            m_queryProxyId = NULL_PROXY;
        }
Пример #2
0
        public BroadPhase()
        {
            ProxyCount = 0;

            m_pairCapacity = 16;
            m_pairCount    = 0;
            m_pairBuffer   = new Pair[m_pairCapacity];
            for (int i = 0; i < m_pairCapacity; i++)
            {
                m_pairBuffer[i] = new Pair();
            }

            m_moveCapacity = 16;
            m_moveCount    = 0;
            m_moveBuffer   = new int[m_moveCapacity];

            m_tree         = new DynamicTree();
            m_queryProxyId = NULL_PROXY;
        }