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

Function B2ContactDestroy

DynamicsB2Contact.go:386–404  ·  view source on GitHub ↗
(contact B2ContactInterface)

Source from the content-addressed store, hash-verified

384}
385
386func B2ContactDestroy(contact B2ContactInterface) {
387 B2Assert(s_initialized == true)
388
389 fixtureA := contact.GetFixtureA()
390 fixtureB := contact.GetFixtureB()
391
392 if contact.GetManifold().PointCount > 0 && fixtureA.IsSensor() == false && fixtureB.IsSensor() == false {
393 fixtureA.GetBody().SetAwake(true)
394 fixtureB.GetBody().SetAwake(true)
395 }
396
397 typeA := fixtureA.GetType()
398 typeB := fixtureB.GetType()
399
400 B2Assert(0 <= typeA && typeB < B2Shape_Type.E_typeCount)
401
402 destroyFcn := s_registers[typeA][typeB].DestroyFcn
403 destroyFcn(contact)
404}
405
406func MakeB2Contact(fA *B2Fixture, indexA int, fB *B2Fixture, indexB int) B2Contact {
407

Callers 1

DestroyMethod · 0.85

Calls 8

B2AssertFunction · 0.85
IsSensorMethod · 0.80
SetAwakeMethod · 0.80
GetBodyMethod · 0.80
GetFixtureAMethod · 0.65
GetFixtureBMethod · 0.65
GetManifoldMethod · 0.65
GetTypeMethod · 0.65

Tested by

no test coverage detected