(other *B2Body)
| 822 | } |
| 823 | |
| 824 | func (body B2Body) ShouldCollide(other *B2Body) bool { |
| 825 | |
| 826 | // At least one body should be dynamic. |
| 827 | if body.M_type != B2BodyType.B2_dynamicBody && other.M_type != B2BodyType.B2_dynamicBody { |
| 828 | return false |
| 829 | } |
| 830 | |
| 831 | // Does a joint prevent collision? |
| 832 | for jn := body.M_jointList; jn != nil; jn = jn.Next { |
| 833 | if jn.Other == other { |
| 834 | if jn.Joint.IsCollideConnected() == false { |
| 835 | return false |
| 836 | } |
| 837 | } |
| 838 | } |
| 839 | |
| 840 | return true |
| 841 | } |
| 842 | |
| 843 | func (body *B2Body) SetTransform(position B2Vec2, angle float64) { |
| 844 | B2Assert(body.M_world.IsLocked() == false) |
nothing calls this directly
no test coverage detected