OSDN Git Service

Swig generated files
[mikumikustudio/libgdx-mikumikustudio.git] / extensions / gdx-bullet / jni / swig-src / com / badlogic / gdx / physics / bullet / btTypedConstraint.java
index 8b18158..61b61a9 100755 (executable)
@@ -14,31 +14,39 @@ import com.badlogic.gdx.math.Matrix3;
 import com.badlogic.gdx.math.Matrix4;\r
 \r
 public class btTypedConstraint extends btTypedObject {\r
-  private long swigCPtr;\r
-\r
-  protected btTypedConstraint(long cPtr, boolean cMemoryOwn) {\r
-    super(gdxBulletJNI.btTypedConstraint_SWIGUpcast(cPtr), cMemoryOwn);\r
-    swigCPtr = cPtr;\r
-  }\r
-\r
-  public static long getCPtr(btTypedConstraint obj) {\r
-    return (obj == null) ? 0 : obj.swigCPtr;\r
-  }\r
-\r
-  protected void finalize() {\r
-    delete();\r
-  }\r
-\r
-  public synchronized void delete() {\r
-    if (swigCPtr != 0) {\r
-      if (swigCMemOwn) {\r
-        swigCMemOwn = false;\r
-        gdxBulletJNI.delete_btTypedConstraint(swigCPtr);\r
-      }\r
-      swigCPtr = 0;\r
-    }\r
-    super.delete();\r
-  }\r
+       private long swigCPtr;\r
+       \r
+       protected btTypedConstraint(final String className, long cPtr, boolean cMemoryOwn) {\r
+               super(className, gdxBulletJNI.btTypedConstraint_SWIGUpcast(cPtr), cMemoryOwn);\r
+               swigCPtr = cPtr;\r
+       }\r
+       \r
+       protected btTypedConstraint(long cPtr, boolean cMemoryOwn) {\r
+               this("btTypedConstraint", cPtr, cMemoryOwn);\r
+               construct();\r
+       }\r
+       \r
+       public static long getCPtr(btTypedConstraint obj) {\r
+               return (obj == null) ? 0 : obj.swigCPtr;\r
+       }\r
+\r
+       @Override\r
+       protected void finalize() throws Throwable {\r
+               if (!destroyed)\r
+                       destroy();\r
+               super.finalize();\r
+       }\r
+\r
+  @Override protected synchronized void delete() {\r
+               if (swigCPtr != 0) {\r
+                       if (swigCMemOwn) {\r
+                               swigCMemOwn = false;\r
+                               gdxBulletJNI.delete_btTypedConstraint(swigCPtr);\r
+                       }\r
+                       swigCPtr = 0;\r
+               }\r
+               super.delete();\r
+       }\r
 \r
   public static btRigidBody getFixedBody() {\r
     return new btRigidBody(gdxBulletJNI.btTypedConstraint_getFixedBody(), false);\r