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); } }
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); }
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; }
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); }
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; } }