B2Contact.cpp
()
| 329 | /////////////////////////////////////////////////////////////////////////////// |
| 330 | |
| 331 | func 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 | |
| 346 | func AddType(createFcn B2ContactCreateFcn, destroyFcn B2ContactDestroyFcn, type1 uint8, type2 uint8) { |
| 347 | B2Assert(0 <= type1 && type1 < B2Shape_Type.E_typeCount) |
no test coverage detected