Exemplo n.º 1
0
        /// <summary>
        /// These support body activation/deactivation.
        /// </summary>
        /// <param name="broadPhase"></param>
        /// <param name="xf"></param>
        internal void CreateProxy(BroadPhase broadPhase, ref Transform xf)
        {
            Debug.Assert(_proxyId == BroadPhase.NullProxy);

            // Create proxy in the broad-phase.
            _shape.ComputeAABB(out _aabb, ref xf);
            _proxyId = broadPhase.CreateProxy(ref _aabb, this);
        }
Exemplo n.º 2
0
        // These support body activation/deactivation.
        internal void CreateProxies(BroadPhase broadPhase, ref Transform xf)
        {
            Debug.Assert(_proxyCount == 0);

            // Create proxies in the broad-phase.
            _proxyCount = _shape.GetChildCount();

            for (int i = 0; i < _proxyCount; ++i)
            {
                FixtureProxy proxy = _proxies[i];
                _shape.ComputeAABB(out proxy.aabb, ref xf, i);
                proxy.fixture    = this;
                proxy.childIndex = i;
                proxy.proxyId    = broadPhase.CreateProxy(ref proxy.aabb, proxy);

                _proxies[i] = proxy;
            }
        }