| 400 | } |
| 401 | |
| 402 | void b2Body::SetTransform(const b2Vec2& position, float32 angle) |
| 403 | { |
| 404 | b2Assert(m_world->IsLocked() == false); |
| 405 | if (m_world->IsLocked() == true) |
| 406 | { |
| 407 | return; |
| 408 | } |
| 409 | |
| 410 | m_xf.q.Set(angle); |
| 411 | m_xf.p = position; |
| 412 | |
| 413 | m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); |
| 414 | m_sweep.a = angle; |
| 415 | |
| 416 | m_sweep.c0 = m_sweep.c; |
| 417 | m_sweep.a0 = angle; |
| 418 | |
| 419 | b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; |
| 420 | for (b2Fixture* f = m_fixtureList; f; f = f->m_next) |
| 421 | { |
| 422 | f->Synchronize(broadPhase, m_xf, m_xf); |
| 423 | } |
| 424 | |
| 425 | m_world->m_contactManager.FindNewContacts(); |
| 426 | } |
| 427 | |
| 428 | void b2Body::SynchronizeFixtures() |
| 429 | { |
no test coverage detected