コード例 #1
0
        // These support body activation/deactivation.
        internal void createProxies(IBroadPhase broadPhase, ref Transform xf)
        {
            Debug.Assert(proxyCount == 0);

            // Create proxies in the broad-phase.
            proxyCount = shape.childCount;

            for (int i = 0; i < proxyCount; ++i)
            {
                FixtureProxy proxy = new FixtureProxy();
                shape.computeAABB(out proxy.AABB, ref xf, i);
                proxy.fixture    = this;
                proxy.childIndex = i;

                //FPE note: This line needs to be after the previous two because FixtureProxy is a struct
                proxy.proxyId = broadPhase.addProxy(ref proxy);

                proxies[i] = proxy;
            }
        }