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

Function B2ContactInitializeRegisters

DynamicsB2Contact.go:331–344  ·  view source on GitHub ↗

B2Contact.cpp

()

Source from the content-addressed store, hash-verified

329///////////////////////////////////////////////////////////////////////////////
330
331func B2ContactInitializeRegisters() {
332 s_registers = make([][]B2ContactRegister, B2Shape_Type.E_typeCount)
333 for i := 0; i < int(B2Shape_Type.E_typeCount); i++ {
334 s_registers[i] = make([]B2ContactRegister, B2Shape_Type.E_typeCount)
335 }
336
337 AddType(B2CircleContact_Create, B2CircleContact_Destroy, B2Shape_Type.E_circle, B2Shape_Type.E_circle)
338 AddType(B2PolygonAndCircleContact_Create, B2PolygonAndCircleContact_Destroy, B2Shape_Type.E_polygon, B2Shape_Type.E_circle)
339 AddType(B2PolygonContact_Create, B2PolygonContact_Destroy, B2Shape_Type.E_polygon, B2Shape_Type.E_polygon)
340 AddType(B2EdgeAndCircleContact_Create, B2EdgeAndCircleContact_Destroy, B2Shape_Type.E_edge, B2Shape_Type.E_circle)
341 AddType(B2EdgeAndPolygonContact_Create, B2EdgeAndPolygonContact_Destroy, B2Shape_Type.E_edge, B2Shape_Type.E_polygon)
342 AddType(B2ChainAndCircleContact_Create, B2ChainAndCircleContact_Destroy, B2Shape_Type.E_chain, B2Shape_Type.E_circle)
343 AddType(B2ChainAndPolygonContact_Create, B2ChainAndPolygonContact_Destroy, B2Shape_Type.E_chain, B2Shape_Type.E_polygon)
344}
345
346func AddType(createFcn B2ContactCreateFcn, destroyFcn B2ContactDestroyFcn, type1 uint8, type2 uint8) {
347 B2Assert(0 <= type1 && type1 < B2Shape_Type.E_typeCount)

Callers 1

B2ContactFactoryFunction · 0.85

Calls 1

AddTypeFunction · 0.85

Tested by

no test coverage detected