| 415 | } |
| 416 | |
| 417 | void b2Body::SetTransform(const b2Vec2& position, float32 angle) |
| 418 | { |
| 419 | b2Assert(m_world->IsLocked() == false); |
| 420 | if (m_world->IsLocked() == true) |
| 421 | { |
| 422 | return; |
| 423 | } |
| 424 | |
| 425 | m_xf.q.Set(angle); |
| 426 | m_xf.p = position; |
| 427 | |
| 428 | m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); |
| 429 | m_sweep.a = angle; |
| 430 | |
| 431 | m_sweep.c0 = m_sweep.c; |
| 432 | m_sweep.a0 = angle; |
| 433 | |
| 434 | b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; |
| 435 | for (b2Fixture* f = m_fixtureList; f; f = f->m_next) |
| 436 | { |
| 437 | f->Synchronize(broadPhase, m_xf, m_xf); |
| 438 | } |
| 439 | |
| 440 | m_world->m_contactManager.FindNewContacts(); |
| 441 | } |
| 442 | |
| 443 | void b2Body::SynchronizeFixtures() |
| 444 | { |
no test coverage detected