internal void Synchronize(IBroadPhase broadPhase, ref Transform transform1, ref Transform transform2) { for (int i = 0; i < ProxyCount; ++i) { FixtureProxy proxy = Proxies[i]; // Compute an AABB that covers the swept Shape (may miss some rotation effect). Shape.ComputeAABB(out AABB aabb1, ref transform1, proxy.ChildIndex); Shape.ComputeAABB(out AABB aabb2, ref transform2, proxy.ChildIndex); proxy.AABB.Combine(ref aabb1, ref aabb2); Vector2 displacement = transform2.p - transform1.p; broadPhase.MoveProxy(proxy.ProxyId, ref proxy.AABB, displacement); } }
internal void Synchronize(IBroadPhase broadPhase, ref Transform transform1, ref Transform transform2) { bool flag = this.ProxyCount == 0; if (!flag) { for (int i = 0; i < this.ProxyCount; i++) { FixtureProxy fixtureProxy = this.Proxies[i]; AABB aABB; this.Shape.ComputeAABB(out aABB, ref transform1, fixtureProxy.ChildIndex); AABB aABB2; this.Shape.ComputeAABB(out aABB2, ref transform2, fixtureProxy.ChildIndex); fixtureProxy.AABB.Combine(ref aABB, ref aABB2); TSVector2 displacement = transform2.p - transform1.p; broadPhase.MoveProxy(fixtureProxy.ProxyId, ref fixtureProxy.AABB, displacement); } } }
public void Synchronize(IBroadPhase broadPhase, b2Transform transform1, b2Transform transform2) { if (m_proxy == null) { return; } // Compute an AABB that ocvers the swept shape (may miss some rotation effect) b2AABB aabb1 = new b2AABB(); b2AABB aabb2 = new b2AABB(); m_shape.ComputeAABB(aabb1, transform1); m_shape.ComputeAABB(aabb2, transform2); m_aabb.Combine(aabb1, aabb2); b2Vec2 displacement = b2Math.SubtractVV(transform2.position, transform1.position); broadPhase.MoveProxy(m_proxy, m_aabb, displacement); }
internal void Synchronize(IBroadPhase broadPhase, ref Transform transform1, ref Transform transform2) { if (ProxyCount == 0) { return; } for (int i = 0; i < ProxyCount; ++i) { FixtureProxy proxy = Proxies[i]; // Compute an AABB that covers the swept Shape (may miss some rotation effect). AABB aabb1, aabb2; Shape.ComputeAABB(out aabb1, ref transform1, proxy.ChildIndex); Shape.ComputeAABB(out aabb2, ref transform2, proxy.ChildIndex); proxy.AABB.Combine(ref aabb1, ref aabb2); Vector2 displacement = transform2.Position - transform1.Position; broadPhase.MoveProxy(proxy.ProxyId, ref proxy.AABB, displacement); } }