()
| 332 | } |
| 333 | |
| 334 | func (fix *B2Fixture) Refilter() { |
| 335 | |
| 336 | if fix.M_body == nil { |
| 337 | return |
| 338 | } |
| 339 | |
| 340 | // Flag associated contacts for filtering. |
| 341 | edge := fix.M_body.GetContactList() |
| 342 | for edge != nil { |
| 343 | contact := edge.Contact |
| 344 | fixtureA := contact.GetFixtureA() |
| 345 | fixtureB := contact.GetFixtureB() |
| 346 | if fixtureA == fix || fixtureB == fix { |
| 347 | contact.FlagForFiltering() |
| 348 | } |
| 349 | |
| 350 | edge = edge.Next |
| 351 | } |
| 352 | |
| 353 | world := fix.M_body.GetWorld() |
| 354 | |
| 355 | if world == nil { |
| 356 | return |
| 357 | } |
| 358 | |
| 359 | // Touch each proxy so that new pairs may be created |
| 360 | broadPhase := &world.M_contactManager.M_broadPhase |
| 361 | for i := 0; i < fix.M_proxyCount; i++ { |
| 362 | broadPhase.TouchProxy(fix.M_proxies[i].ProxyId) |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | func (fix *B2Fixture) SetSensor(sensor bool) { |
| 367 | if sensor != fix.M_isSensor { |
no test coverage detected