Example #1
0
 public b2Body CreateBody(b2BodyDef def)
 {
     IntPtr cPtr = Box2DPINVOKE.b2World_CreateBody(swigCPtr, b2BodyDef.getCPtr(def));
     b2Body ret = (cPtr == IntPtr.Zero) ? null : new b2Body(cPtr, false);
     return ret;
 }
Example #2
0
 internal static HandleRef getCPtr(b2BodyDef obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }