DestroyProxy() public méthode

public DestroyProxy ( int proxyId ) : void
proxyId int
Résultat void
Exemple #1
0
 internal void DestroyProxy(BroadPhase broadPhase)
 {
     if (_proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy(_proxyId);
         _proxyId = PairManager.NullProxy;
     }
 }
Exemple #2
0
 internal void DestroyProxy(BroadPhase broadPhase)
 {
     if (this._proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy((int)this._proxyId);
         this._proxyId = PairManager.NullProxy;
     }
 }
Exemple #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;
         }
     }
 }
Exemple #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;
            }
        }
Exemple #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;
         }
     }
 }
Exemple #6
0
 internal void DestroyProxy(BroadPhase broadPhase)
 {
     if (this._proxyId != PairManager.NullProxy)
     {
         broadPhase.DestroyProxy((int)this._proxyId);
         this._proxyId = PairManager.NullProxy;
     }
 }
Exemple #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;
        }
Exemple #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;
            }
        }
Exemple #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;
        }
Exemple #10
0
		internal void DestroyProxy(BroadPhase broadPhase)
		{
			if (_proxyId != PairManager.NullProxy)
			{
				broadPhase.DestroyProxy(_proxyId);
				_proxyId = PairManager.NullProxy;
			}
		}