DestroyProxy() public method

public DestroyProxy ( int proxyId ) : void
proxyId int
return void
Exemplo n.º 1
0
 internal void DestroyProxy(BroadPhase broadPhase)
 {
     if (_proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy(_proxyId);
         _proxyId = PairManager.NullProxy;
     }
 }
Exemplo n.º 2
0
 internal void DestroyProxy(BroadPhase broadPhase)
 {
     if (this._proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy((int)this._proxyId);
         this._proxyId = PairManager.NullProxy;
     }
 }
Exemplo n.º 3
0
 internal void RefilterProxy(BroadPhase broadPhase, XForm transform)
 {
     if (this._proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy((int)this._proxyId);
         AABB aabb;
         this.ComputeAABB(out aabb, transform);
         bool flag = broadPhase.InRange(aabb);
         if (flag)
         {
             this._proxyId = broadPhase.CreateProxy(aabb, this);
         }
         else
         {
             this._proxyId = PairManager.NullProxy;
         }
     }
 }
Exemplo n.º 4
0
        internal void RefilterProxy(BroadPhase broadPhase, XForm transform)
        {
            if (_proxyId == PairManager.NullProxy)
            {
                return;
            }

            broadPhase.DestroyProxy(_proxyId);

            AABB aabb;

            ComputeAABB(out aabb, transform);

            bool inRange = broadPhase.InRange(aabb);

            if (inRange)
            {
                _proxyId = broadPhase.CreateProxy(aabb, this);
            }
            else
            {
                _proxyId = PairManager.NullProxy;
            }
        }
Exemplo n.º 5
0
 internal void RefilterProxy(BroadPhase broadPhase, XForm transform)
 {
     if (this._proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy((int)this._proxyId);
         AABB aabb;
         this.ComputeAABB(out aabb, transform);
         bool flag = broadPhase.InRange(aabb);
         if (flag)
         {
             this._proxyId = broadPhase.CreateProxy(aabb, this);
         }
         else
         {
             this._proxyId = PairManager.NullProxy;
         }
     }
 }
Exemplo n.º 6
0
 internal void DestroyProxy(BroadPhase broadPhase)
 {
     if (this._proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy((int)this._proxyId);
         this._proxyId = PairManager.NullProxy;
     }
 }
Exemplo n.º 7
0
        public void Destroy(BroadPhase broadPhase)
        {
            // Remove proxy from the broad-phase.
            if (ProxyId != BroadPhase.NullProxy)
            {
                broadPhase.DestroyProxy(ProxyId);
                ProxyId = BroadPhase.NullProxy;
            }

            // Free the child shape.
            switch (Shape.Type)
            {
                case ShapeType.CircleShape:
                    {
                        //CircleShape s = (CircleShape)Shape;
                        //s->~b2CircleShape();
                        //allocator->Free(s, sizeof(b2CircleShape));
                    }
                    break;

                case ShapeType.PolygonShape:
                    {
                        //b2PolygonShape* s = (b2PolygonShape*)m_shape;
                        //s->~b2PolygonShape();
                        //allocator->Free(s, sizeof(b2PolygonShape));
                    }
                    break;
                default:
                    Box2DXDebug.Assert(false);
                    break;
            }

            Shape = null;
        }
Exemplo n.º 8
0
        internal void RefilterProxy(BroadPhase broadPhase, XForm transform)
        {
            if (_proxyId == PairManager.NullProxy)
            {
                return;
            }

            broadPhase.DestroyProxy(_proxyId);

            AABB aabb;
            _shape.ComputeAABB(out aabb, transform);

            bool inRange = broadPhase.InRange(aabb);

            if (inRange)
            {
                _proxyId = broadPhase.CreateProxy(aabb, this);
            }
            else
            {
                _proxyId = PairManager.NullProxy;
            }
        }
Exemplo n.º 9
0
        public void Destroy(BroadPhase broadPhase)
        {
            // Remove proxy from the broad-phase.
            if (_proxyId != PairManager.NullProxy)
            {
                broadPhase.DestroyProxy(_proxyId);
                _proxyId = PairManager.NullProxy;
            }

            // Free the child shape.
            _shape.Dispose();
            _shape = null;
        }
Exemplo n.º 10
0
		internal void DestroyProxy(BroadPhase broadPhase)
		{
			if (_proxyId != PairManager.NullProxy)
			{
				broadPhase.DestroyProxy(_proxyId);
				_proxyId = PairManager.NullProxy;
			}
		}