MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / ShouldCollide

Method ShouldCollide

engine/source/Box2D/Dynamics/b2Body.cpp:394–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394bool 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
417void b2Body::SetTransform(const b2Vec2& position, float32 angle)
418{

Callers 2

CollideMethod · 0.45
AddPairMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected