| 150 | } |
| 151 | |
| 152 | void b2Fixture::Synchronize(b2BroadPhase* broadPhase, const b2Transform& transform1, const b2Transform& transform2) |
| 153 | { |
| 154 | if (m_proxyCount == 0) |
| 155 | { |
| 156 | return; |
| 157 | } |
| 158 | |
| 159 | for (int32 i = 0; i < m_proxyCount; ++i) |
| 160 | { |
| 161 | b2FixtureProxy* proxy = m_proxies + i; |
| 162 | |
| 163 | // Compute an AABB that covers the swept shape (may miss some rotation effect). |
| 164 | b2AABB aabb1, aabb2; |
| 165 | m_shape->ComputeAABB(&aabb1, transform1, proxy->childIndex); |
| 166 | m_shape->ComputeAABB(&aabb2, transform2, proxy->childIndex); |
| 167 | |
| 168 | proxy->aabb.Combine(aabb1, aabb2); |
| 169 | |
| 170 | b2Vec2 displacement = transform2.p - transform1.p; |
| 171 | |
| 172 | broadPhase->MoveProxy(proxy->proxyId, proxy->aabb, displacement); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | void b2Fixture::SetFilterData(const b2Filter& filter) |
| 177 | { |
no test coverage detected