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

Method CreateProxies

DynamicsB2Fixture.go:279–292  ·  view source on GitHub ↗
(broadPhase *B2BroadPhase, xf B2Transform)

Source from the content-addressed store, hash-verified

277}
278
279func (fix *B2Fixture) CreateProxies(broadPhase *B2BroadPhase, xf B2Transform) {
280 B2Assert(fix.M_proxyCount == 0)
281
282 // Create proxies in the broad-phase.
283 fix.M_proxyCount = fix.M_shape.GetChildCount()
284
285 for i := 0; i < fix.M_proxyCount; i++ {
286 proxy := &fix.M_proxies[i]
287 fix.M_shape.ComputeAABB(&proxy.Aabb, xf, i)
288 proxy.ProxyId = broadPhase.CreateProxy(proxy.Aabb, proxy)
289 proxy.Fixture = fix
290 proxy.ChildIndex = i
291 }
292}
293
294func (fix *B2Fixture) DestroyProxies(broadPhase *B2BroadPhase) {
295 // Destroy proxies in the broad-phase.

Callers 2

CreateFixtureFromDefMethod · 0.95
SetActiveMethod · 0.80

Calls 4

B2AssertFunction · 0.85
GetChildCountMethod · 0.65
ComputeAABBMethod · 0.65
CreateProxyMethod · 0.45

Tested by

no test coverage detected