protected static void AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destoryFcn, b2Shape.Type type1, b2Shape.Type type2) { Debug.Assert(0 <= ((int)type1) && type1 < b2Shape.Type.e_typeCount); Debug.Assert(0 <= ((int)type2) && type2 < b2Shape.Type.e_typeCount); s_registers[(int)type1, (int)type2] = new b2ContactRegister(); s_registers[(int)type1, (int)type2].createFcn = createFcn; s_registers[(int)type1, (int)type2].destroyFcn = destoryFcn; s_registers[(int)type1, (int)type2].primary = true; if (type1 != type2) { s_registers[(int)type2, (int)type1] = new b2ContactRegister(); s_registers[(int)type2, (int)type1].createFcn = createFcn; s_registers[(int)type2, (int)type1].destroyFcn = destoryFcn; s_registers[(int)type2, (int)type1].primary = false; } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(b2ContactRegister obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }