(broadPhase *B2BroadPhase, transform1 B2Transform, transform2 B2Transform)
| 303 | } |
| 304 | |
| 305 | func (fix *B2Fixture) Synchronize(broadPhase *B2BroadPhase, transform1 B2Transform, transform2 B2Transform) { |
| 306 | |
| 307 | if fix.M_proxyCount == 0 { |
| 308 | return |
| 309 | } |
| 310 | |
| 311 | for i := 0; i < fix.M_proxyCount; i++ { |
| 312 | |
| 313 | proxy := &fix.M_proxies[i] |
| 314 | |
| 315 | // Compute an AABB that covers the swept shape (may miss some rotation effect). |
| 316 | aabb1 := MakeB2AABB() |
| 317 | aabb2 := MakeB2AABB() |
| 318 | fix.M_shape.ComputeAABB(&aabb1, transform1, proxy.ChildIndex) |
| 319 | fix.M_shape.ComputeAABB(&aabb2, transform2, proxy.ChildIndex) |
| 320 | |
| 321 | proxy.Aabb.CombineTwoInPlace(aabb1, aabb2) |
| 322 | |
| 323 | displacement := B2Vec2Sub(transform2.P, transform1.P) |
| 324 | |
| 325 | broadPhase.MoveProxy(proxy.ProxyId, proxy.Aabb, displacement) |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | func (fix *B2Fixture) SetFilterData(filter B2Filter) { |
| 330 | fix.M_filter = filter |
no test coverage detected