(body *B2Body)
| 31 | } |
| 32 | |
| 33 | func (island *B2Island) AddBody(body *B2Body) { |
| 34 | B2Assert(island.M_bodyCount < island.M_bodyCapacity) |
| 35 | body.M_islandIndex = island.M_bodyCount |
| 36 | island.M_bodies[island.M_bodyCount] = body |
| 37 | island.M_bodyCount++ |
| 38 | } |
| 39 | |
| 40 | func (island *B2Island) AddContact(contact B2ContactInterface) { // contact has to be a pointer |
| 41 | B2Assert(island.M_contactCount < island.M_contactCapacity) |