OSDN Git Service

Bullet: Fix swig with correct Model path
authorXoppa <contact@xoppa.nl>
Thu, 6 Jun 2013 18:23:26 +0000 (20:23 +0200)
committerXoppa <contact@xoppa.nl>
Thu, 6 Jun 2013 18:23:26 +0000 (20:23 +0200)
extensions/gdx-bullet/jni/swig/custom/btBvhTriangleMeshShape.i
extensions/gdx-bullet/jni/swig/custom/btTriangleIndexVertexArray.i

index bbdb707..fccab4b 100644 (file)
@@ -7,6 +7,15 @@
 #include <BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h>
 %}
 
+%typemap(javaimports) btBvhTriangleMeshShape %{
+import com.badlogic.gdx.math.Vector3;
+import com.badlogic.gdx.math.Quaternion;
+import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Matrix4;
+import com.badlogic.gdx.graphics.Mesh;
+import com.badlogic.gdx.graphics.g3d.Model;
+%}
+
 %typemap(javacode) btBvhTriangleMeshShape %{
        protected btStridingMeshInterface meshInterface = null;
        
                this.meshInterface = meshInterface;
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.Mesh} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Mesh} instances.
         * The specified meshes must be indexed and triangulated and must outlive this btBvhTriangleMeshShape.
      * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, final com.badlogic.gdx.graphics.Mesh... meshes) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, final Mesh... meshes) {
                this(true, new btTriangleIndexVertexArray(meshes), useQuantizedAabbCompression);
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.Mesh} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Mesh} instances.
         * The specified meshes must be indexed and triangulated and must outlive this btBvhTriangleMeshShape.
      * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, boolean buildBvh, final com.badlogic.gdx.graphics.Mesh... meshes) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, boolean buildBvh, final Mesh... meshes) {
                this(true, new btTriangleIndexVertexArray(meshes), useQuantizedAabbCompression, buildBvh);
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.Mesh} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Mesh} instances.
         * The specified meshes must be indexed and triangulated and must outlive this btBvhTriangleMeshShape.
      * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, boolean buildBvh, final com.badlogic.gdx.graphics.Mesh... meshes) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, boolean buildBvh, final Mesh... meshes) {
                this(true, new btTriangleIndexVertexArray(meshes), useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh);
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.Mesh} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Mesh} instances.
         * The specified meshes must be indexed and triangulated and must outlive this btBvhTriangleMeshShape.
      * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, final com.badlogic.gdx.graphics.Mesh... meshes) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, final Mesh... meshes) {
                this(true, new btTriangleIndexVertexArray(meshes), useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax);
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.g3d.model.Model} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Model} instances.
         * Only the triangulated submeshes are added, which must be indexed. The model must outlive this btTriangleIndexVertexArray.
      * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, final com.badlogic.gdx.graphics.g3d.model.Model... models) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, final Model... models) {
                this(true, new btTriangleIndexVertexArray(models), useQuantizedAabbCompression);
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.g3d.model.Model} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Model} instances.
         * Only the triangulated submeshes are added, which must be indexed. The model must outlive this btTriangleIndexVertexArray.
      * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, boolean buildBvh, final com.badlogic.gdx.graphics.g3d.model.Model... models) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, boolean buildBvh, final Model... models) {
                this(true, new btTriangleIndexVertexArray(models), useQuantizedAabbCompression, buildBvh);
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.g3d.model.Model} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Model} instances.
         * Only the triangulated submeshes are added, which must be indexed. The model must outlive this btTriangleIndexVertexArray.
         * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, boolean buildBvh, final com.badlogic.gdx.graphics.g3d.model.Model... models) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, boolean buildBvh, final Model... models) {
                this(true, new btTriangleIndexVertexArray(models), useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh);
        }
        
-       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link com.badlogic.gdx.graphics.g3d.model.Model} instances.
+       /** Construct a new btBvhTriangleMeshShape based one or more supplied {@link Model} instances.
         * Only the triangulated submeshes are added, which must be indexed. The model must outlive this btTriangleIndexVertexArray.
      * The buffers for the vertices and indices are shared amonst both. */
-       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, final com.badlogic.gdx.graphics.g3d.model.Model... models) {
+       public btBvhTriangleMeshShape(boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, final Model... models) {
                this(true, new btTriangleIndexVertexArray(models), useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax);
        }
                
index 3f8123a..0c92389 100644 (file)
@@ -74,6 +74,15 @@ import com.badlogic.gdx.graphics.VertexAttributes.Usage;
        }
 %}
 
+%typemap(javaimports) btTriangleIndexVertexArray %{
+import com.badlogic.gdx.math.Vector3;
+import com.badlogic.gdx.math.Quaternion;
+import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Matrix4;
+import com.badlogic.gdx.graphics.Mesh;
+import com.badlogic.gdx.graphics.g3d.Model;
+%}
+
 %typemap(javacode) btTriangleIndexVertexArray %{
        com.badlogic.gdx.utils.Array<btIndexedMesh> meshes = null;
        
@@ -85,10 +94,10 @@ import com.badlogic.gdx.graphics.VertexAttributes.Usage;
                addMesh(meshes);
        }
        
-       /** Construct a new btTriangleIndexVertexArray based on one or more {@link com.badlogic.gdx.graphics.g3d.model.Model} instances.
+       /** Construct a new btTriangleIndexVertexArray based on one or more {@link Model} instances.
         * Only the triangulated submeshes are added, which must be indexed. The model must outlive this btTriangleIndexVertexArray.
      * The buffers for the vertices and indices are shared amongst both. */
-       public btTriangleIndexVertexArray(final com.badlogic.gdx.graphics.g3d.model.Model... models) {
+       public btTriangleIndexVertexArray(final Model... models) {
                this();
                addModel(models);
        }
@@ -101,10 +110,10 @@ import com.badlogic.gdx.graphics.VertexAttributes.Usage;
                        addIndexedMesh(new btIndexedMesh(meshes[i]), PHY_ScalarType.PHY_SHORT, true);
        }
        
-       /** Add one or more {@link com.badlogic.gdx.graphics.g3d.model.Model} instances to this btTriangleIndexVertexArray.
+       /** Add one or more {@link Model} instances to this btTriangleIndexVertexArray.
         * Only the triangulated submeshes are added, which must be indexed. The model must outlive this btTriangleIndexVertexArray.
      * The buffers for the vertices and indices are shared amongst both. */
-       public void addModel(final com.badlogic.gdx.graphics.g3d.model.Model... models) {
+       public void addModel(final Model... models) {
                for (int i = 0; i < models.length; i++) {
                        for (int j = 0; j < models[i].meshParts.size; j++) {
                                com.badlogic.gdx.graphics.g3d.model.MeshPart mp = models[i].meshParts.get(j);