| 392 | } |
| 393 | |
| 394 | bool b2Body::ShouldCollide(const b2Body* other) const |
| 395 | { |
| 396 | // At least one body should be dynamic. |
| 397 | if (m_type != b2_dynamicBody && other->m_type != b2_dynamicBody) |
| 398 | { |
| 399 | return false; |
| 400 | } |
| 401 | |
| 402 | // Does a joint prevent collision? |
| 403 | for (b2JointEdge* jn = m_jointList; jn; jn = jn->next) |
| 404 | { |
| 405 | if (jn->other == other) |
| 406 | { |
| 407 | if (jn->joint->m_collideConnected == false) |
| 408 | { |
| 409 | return false; |
| 410 | } |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | return true; |
| 415 | } |
| 416 | |
| 417 | void b2Body::SetTransform(const b2Vec2& position, float32 angle) |
| 418 | { |