예제 #1
0
        public virtual void CreateProxies(b2BroadPhase broadPhase, b2Transform xf)
        {
            // Create proxies in the broad-phase.
            m_proxyCount = m_shape.GetChildCount();

            for (int i = 0; i < m_proxyCount; ++i)
            {
                b2FixtureProxy proxy = m_proxies[i];
                proxy.aabb       = m_shape.ComputeAABB(xf, i);
                proxy.proxyId    = broadPhase.CreateProxy(proxy.aabb, proxy);
                proxy.fixture    = this;
                proxy.childIndex = i;
            }
        }
예제 #2
0
    // These support body activation/deactivation.
    internal void CreateProxies(b2BroadPhase broadPhase, b2Transform xf)
    {
        Debug.Assert(m_proxyCount == 0);

        // Create proxies in the broad-phase.
        m_proxyCount = m_shape.GetChildCount();

        for (int i = 0; i < m_proxyCount; ++i)
        {
            b2FixtureProxy proxy = m_proxies[i];
            m_shape.ComputeAABB(ref proxy.aabb, xf, i);
            proxy.proxyId    = broadPhase.CreateProxy(ref proxy.aabb, proxy);
            proxy.fixture    = this;
            proxy.childIndex = i;
        }
    }
예제 #3
0
        public virtual void CreateProxies(b2BroadPhase broadPhase, b2Transform xf)
        {
            // Create proxies in the broad-phase.
            m_proxyCount = m_shape.GetChildCount();

            for (int i = 0; i < m_proxyCount; ++i)
            {
                b2FixtureProxy proxy = m_proxies[i];
                proxy.aabb = m_shape.ComputeAABB(xf, i);
                proxy.fixture = this;
                proxy.childIndex = i;
                proxy.proxyId = broadPhase.CreateProxy(proxy.aabb, ref proxy);
                m_proxies[i] = proxy;
            }
        }