MCPcopy Create free account
hub / github.com/ByteArena/box2d / AddBody

Method AddBody

DynamicsB2Island.go:33–38  ·  view source on GitHub ↗
(body *B2Body)

Source from the content-addressed store, hash-verified

31}
32
33func (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
40func (island *B2Island) AddContact(contact B2ContactInterface) { // contact has to be a pointer
41 B2Assert(island.M_contactCount < island.M_contactCapacity)

Callers 2

SolveMethod · 0.80
SolveTOIMethod · 0.80

Calls 1

B2AssertFunction · 0.85

Tested by

no test coverage detected