MoveProxy() public méthode

public MoveProxy ( int proxyId, AABB aabb ) : void
proxyId int
aabb AABB
Résultat void
Exemple #1
0
        internal bool Synchronize(BroadPhase broadPhase, XForm transform1, XForm transform2)
        {
            if (_proxyId == PairManager.NullProxy)
            {
                return(false);
            }

            // Compute an AABB that covers the swept shape (may miss some rotation effect).
            AABB aabb;

            ComputeSweptAABB(out aabb, transform1, transform2);

            if (broadPhase.InRange(aabb))
            {
                broadPhase.MoveProxy(_proxyId, aabb);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #2
0
        internal bool Synchronize(BroadPhase broadPhase, XForm transform1, XForm transform2)
        {
            bool result;

            if (this._proxyId == PairManager.NullProxy)
            {
                result = false;
            }
            else
            {
                AABB aabb;
                this.ComputeSweptAABB(out aabb, transform1, transform2);
                if (broadPhase.InRange(aabb))
                {
                    broadPhase.MoveProxy((int)this._proxyId, aabb);
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            return(result);
        }
Exemple #3
0
 internal bool Synchronize(BroadPhase broadPhase, XForm transform1, XForm transform2)
 {
     bool result;
     if (this._proxyId == PairManager.NullProxy)
     {
         result = false;
     }
     else
     {
         AABB aabb;
         this.ComputeSweptAABB(out aabb, transform1, transform2);
         if (broadPhase.InRange(aabb))
         {
             broadPhase.MoveProxy((int)this._proxyId, aabb);
             result = true;
         }
         else
         {
             result = false;
         }
     }
     return result;
 }
Exemple #4
0
        public void Synchronize(BroadPhase broadPhase, Transform transform1, Transform transform2)
        {
            if (ProxyId == BroadPhase.NullProxy)
            {
                return;
            }

            // Compute an AABB that covers the swept shape (may miss some rotation effect).
            AABB aabb1, aabb2;
            Shape.ComputeAABB(out aabb1, ref transform1);
            Shape.ComputeAABB(out aabb2, ref transform2);

            Aabb.Combine(aabb1, aabb2);

            Vec2 displacement = transform2.Position - transform1.Position;

            broadPhase.MoveProxy(ProxyId, Aabb, displacement);
        }
Exemple #5
0
        internal bool Synchronize(BroadPhase broadPhase, XForm transform1, XForm transform2)
        {
            if (_proxyId == PairManager.NullProxy)
            {
                return false;
            }

            // Compute an AABB that covers the swept shape (may miss some rotation effect).
            AABB aabb1, aabb2;
            _shape.ComputeAABB(out aabb1, transform1);
            _shape.ComputeAABB(out aabb2, transform2);

            AABB aabb = new AABB();
            aabb.Combine(aabb1, aabb2);

            if (broadPhase.InRange(aabb))
            {
                broadPhase.MoveProxy(_proxyId, aabb);
                return true;
            }
            else
            {
                return false;
            }
        }